Hi all,

I used to have the $MakeUploadNamePatterns defined as:

$UploadNameChars = "-\\w. ";
$MakeUploadNamePatterns = array(
    "/[^$UploadNameChars]/" => '',
    '/\\.[^.]*$/e' => 'strtolower("$0")',
    '/^[^[:alnum:]_]+/' => '',
    '/[^[:alnum:]_]+$/' => '',
    '/\\s/' => '_');

Note it only differs with default on the space-underscore substitution.

I just upgraded php and all other software in the server, and to my
surprise filenames are not sanitized as expected any more. Lots of files
are not recognized because their sanitized name is different :(

The reason is that "_" is now a callable function of php:

http://fr.php.net/_

(Or, may be I didn't have the gettext extension enabled before)

Anyway, do you think It's possible to bypass the problem without
modifying scripts/upload.php?


Regards,

carles

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to