Skip to content

Commit

Permalink
regression fix file upload logic error would rename '_' to '..'
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Oct 31, 2016
1 parent 2f1baa8 commit 55dd0c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/modules/file/models/expFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ public static function fixName($name) {
$name = preg_replace('/[^A-Za-z0-9\.]/','_',$name);
if ($name[0] == '.') // attempt to upload a dot file
$name[0] = '_';
$name = str_replace('_', '..', $name); // attempt to upload with redirection to new folder
$name = str_replace('..', '_', $name); // attempt to upload with redirection to new folder
return $name;
// return preg_replace('/[^A-Za-z0-9\.]/', '-', $name);
}
Expand Down

0 comments on commit 55dd0c7

Please sign in to comment.