Skip to content

Commit

Permalink
SECURITY: prevent directory traversal vulnerability.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jan 4, 2019
1 parent 4ad07d7 commit f5fc41e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Horde/Form/Type.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ function _getUpload(&$vars, &$var)
/* Get the temp file if already one uploaded, otherwise create a /* Get the temp file if already one uploaded, otherwise create a
* new temporary file. */ * new temporary file. */
if (!empty($upload['img']['file'])) { if (!empty($upload['img']['file'])) {
$tmp_file = Horde::getTempDir() . '/' . $upload['img']['file']; $tmp_file = Horde::getTempDir() . '/' . basename($upload['img']['file']);
} else { } else {
$tmp_file = Horde::getTempFile('Horde', false); $tmp_file = Horde::getTempFile('Horde', false);
} }
Expand Down

0 comments on commit f5fc41e

Please sign in to comment.