Permalink
Browse files

MDL-21300 - remove filename validation for invalid character.

  • Loading branch information...
1 parent e9117aa commit 24fadf0d4a42bc08edc5642ead0943dbe6665a92 Rossiani Wijaya committed Jan 22, 2010
Showing with 1 addition and 7 deletions.
  1. +1 −7 admin/uploadpicture.php
View
@@ -198,13 +198,7 @@ function process_file ($file, $userfield, $overwrite) {
$path_parts = pathinfo(cleardoubleslashes($file));
$basename = $path_parts['basename'];
$extension = $path_parts['extension'];
- if ($basename != clean_param($basename, PARAM_FILE)) {
- // The original picture file name has invalid characters
- echo $OUTPUT->notification(get_string('uploadpicture_invalidfilename', 'admin',
- clean_param($basename, PARAM_CLEANHTML)));
- return PIX_FILE_ERROR;
- }
-
+
// The picture file name (without extension) must match the
// userfield attribute.
$uservalue = substr($basename, 0,

0 comments on commit 24fadf0

Please sign in to comment.