Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Little Bug in /administrator/photos.php and /submit.php

I found a little bug in PHP-Fusion v6.01.10 and in PHP-Fusion v6.01.11 too,
it's a little bug on regex that check the filename,


the original regex to check the filename:
CodeDownload  

if (!preg_match("/^[-0-9A-Z_\.\[\]]+$/i", $photo_pic['name'])) {


return error if the filename contains spaces,

this will fix the check to accept one or more spaces in the filename of the photo:
CodeDownload  

if (!preg_match("/^[-0-9A-Z_\.\[\]\s]+$/i", $photo_pic['name'])) {



Simply I've added \s to the regex string to enable it to accept spaces,

NOTE: I've fixed with this method /administrator/photos.php and /submit.php, and all works ok.

Hope this fixes help someone.

;):)
Found same errors in: postedit.php postnewthread.php postreply.php


;);)
that's supposed to be that way. spaces in filenames cause problems.
Thread Information
Author
Replies
3 posts
Views
2,101 times
Last Post
Last updated on 12 years ago
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.