Hi,
I'm trying to upload a picture with batch with this name: 01~242.jpg and it gives me this error (I'm translating it from Spanish so it's similar): "Only files with the following extensions are accepted" and it includes .jpg, if I remove the ~ it works but if not it gave me that error. I have downloaded and uploaded (on ftp) to many pictures to change each one.. :/ What Can I do?
Update you Coppermine installation to the latest version.
Hi,
I have the latest: 1.5.30
Quote from: ron4mac on September 28, 2014, 02:18:28 PM
Update you Coppermine installation to the latest version.
I've tried to replicate your problem but on my installation of 1.5.30 it functions without any error.
I think it's something related with the server or maybe because I'm using GD instead of Imagemagick :/ I don't know but I hate it.
Quote from: ron4mac on September 28, 2014, 05:41:13 PM
I've tried to replicate your problem but on my installation of 1.5.30 it functions without any error.
Hold on ... I've been able to replicate your issue. Give me a few hours to come up with a solution for you.
Thank you so much!
Quote from: ron4mac on September 28, 2014, 06:16:43 PM
Hold on ... I've been able to replicate your issue. Give me a few hours to come up with a solution for you.
Sorry I couldn't get to this sooner ...
This interim patch for the issue you are experiencing is not official.
In the file searchnew.php at about line #106 change:
$encoded_picfile = base64_encode($picfile);
to:
$encoded_picfile = urlencode(base64_encode($picfile));
And in the file showthumb.php at about line #141 change:
$matches = $superCage->get->getMatched('picfile', '/^[0-9A-Za-z\/\\\\_.-\s]+$/');
to: (add a tilde [~] after the lowercase z)
$matches = $superCage->get->getMatched('picfile', '/^[0-9A-Za-z~\/\\\\_.-\s]+$/');
Anything official involving this would be pending whether ~'s are to be acceptably allowed in file names.
I don't see a reason to disallow the tilde, as it's also used for the HTTP upload forms:
while (file_exists($dest_dir . $picture_name)) {
$picture_name = $matches[1] . '~' . $nr++ . '.' . $matches[2];
}
I'll have a closer look at your patch and add it to our SVN repository, if applicable.
It worked! Thank you so much :D
Quote from: ron4mac on September 29, 2014, 12:33:05 AM
Sorry I couldn't get to this sooner ...
This interim patch for the issue you are experiencing is not official.
In the file searchnew.php at about line #106 change:
$encoded_picfile = base64_encode($picfile);
to:
$encoded_picfile = urlencode(base64_encode($picfile));
And in the file showthumb.php at about line #141 change:
$matches = $superCage->get->getMatched('picfile', '/^[0-9A-Za-z\/\\\\_.-\s]+$/');
to: (add a tilde [~] after the lowercase z)
$matches = $superCage->get->getMatched('picfile', '/^[0-9A-Za-z~\/\\\\_.-\s]+$/');
Anything official involving this would be pending whether ~'s are to be acceptably allowed in file names.
Those changes have been committed in SVN revision 8741 and will be part of cpg1.5.32 and later.