Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#6664 from akrabat/hotf…
Browse files Browse the repository at this point in the history
…ix/uploadfile

Use file_exists to check for an uploaded file.
  • Loading branch information
weierophinney committed Sep 16, 2014
2 parents 2ab49f1 + 49847e2 commit bc95efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/File/UploadFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function isValid($value)

switch ($error) {
case UPLOAD_ERR_OK:
if (empty($file) || false === stream_resolve_include_path($file)) {
if (empty($file) || false === is_file($file)) {
$this->error(self::FILE_NOT_FOUND);
} elseif (! is_uploaded_file($file)) {
$this->error(self::ATTACK);
Expand Down

0 comments on commit bc95efb

Please sign in to comment.