Skip to content

Commit

Permalink
Merge pull request #218 from benholmen/dev
Browse files Browse the repository at this point in the history
Sanitize uploaded file name
  • Loading branch information
ideadude authored Oct 13, 2021
2 parents 2780df6 + f91d02b commit a685806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/class.field.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function saveFile($user_id, $name, $value)
}

//figure out new filename
$filename = $file['name'];
$filename = sanitize_file_name($file['name']);
$count = 0;

while(file_exists($pmprorh_dir . $filename))
Expand Down

0 comments on commit a685806

Please sign in to comment.