There I am again. Since we had SC6 I saw a bug in the file uploads. Namely that filenames with a + in it will not get uploaded.
This bug still exists evn up to the last SC8 version .0023 as I am counting.!!!
I have told in detail how to hack the generated code to make it work, I can provide an application that shows it and still it is NOT fixed…
I want this bug fixed, together with other behaviour that is wrong.
The worst case is that the *_nmutf8.php is still wrong. This goes for ALL pplications that have the …_nmutf8.php (so almost everyone).
I have the details to fix this once generated. Where can I send my application with the details for scriptcase to fix this bug?
I am getting fed up fixing bugs in the deployment every time.
Since the NM_utf8_urldecode is used a LOT I find this a pretty serious error.
And I dont want an answer like ‘reported to our development team’ that basically means it never gets fixed.
So where can I send a simple application with reports on the fixes and what I found to go wrong.
As a general remark, if NM_utf8_urldecode decodes a + character to , (instead of + what it should be)
This is the generated code:
function NM_utf8_urldecode($str)
{
if (is_array($str))
{
return $str;
}
$aRep = array(
'&' => '&',
'<' => '<',
'>' => '>',
'"' => '"',
"'" => ''',
'+' => ',',
'?' => 'Á',
'?' => 'á',
'?' => 'Â',
'?' => 'â',
'?' => 'À',
'?' => 'à',
'?' => 'Å',
'?' => 'å',
'?' => 'Ã',
'?' => 'ã',
'?' => 'Ä',
'?' => 'ä',
'?' => '&Aelig;',
'?' => 'æ',
'?' => 'Ç',
'?' => 'ç',
'?' => 'É',
'?' => 'é',
'?' => 'Ê',
'?' => 'ê',
'?' => 'È',
'?' => 'è',
'?' => 'Ë',
'?' => 'ë',
'?' => 'Í',
'?' => 'í',
'?' => 'Î',
'?' => 'î',
'?' => 'Ì',
'?' => 'ì',
'?' => 'Ï',
'?' => 'ï',
'?' => 'Ñ',
'?' => 'ñ',
'?' => 'Ó',
'?' => 'ó',
'?' => 'Ô',
'?' => 'ô',
'?' => 'Ò',
'?' => 'ò',
'?' => 'Õ',
'?' => 'õ',
'?' => 'Ö',
'?' => 'ö',
'?' => 'Ú',
'?' => 'ú',
'?' => 'Û',
'?' => 'û',
'?' => 'Ù',
'?' => 'ù',
'?' => 'Ü',
'?' => 'ü',
'?' => '¨',
'?' => '¸',
'?' => '´',
'?' => '¡',
'?' => '¿',
'?' => '·',
'?' => '€',
'?' => '¢',
'?' => '£',
'?' => '¤',
'?' => '¥',
'?' => '§',
'?' => '©',
'?' => '®',
'?' => '°',
'?' => 'ª',
'?' => 'º',
'?' => '¹',
'?' => '²',
'?' => '³',
'?' => '¼',
'?' => '½',
'?' => '¾',
'?' => '«',
'?' => '»',
'?' => '¬',
'?' => '±',
'?' => 'µ',
'?' => '¶',
' ' => ' ',
'?' => '%u201C',
'?' => '%u201D',
'?' => '%u2018',
'?' => '%u2019',
);
$str = str_replace(array_values($aRep), array_keys($aRep), $str);
if (isset($_SESSION['scriptcase']['charset']) && 'UTF-8' == $_SESSION['scriptcase']['charset'])
{
$str = mb_convert_encoding($str, 'UTF-8');
}
$str = preg_replace("/%u([0-9a-f]{3,4})/i", "&#x\\1;", urldecode($str));
if (isset($_SESSION['scriptcase']['charset']) && 'BIG-5' == $_SESSION['scriptcase']['charset'])
{
$str = @html_entity_decode($str, null, 'BIG5');
}
else
{
$str = @html_entity_decode($str, null, $_SESSION['scriptcase']['charset']);
}
$str = NM_charset_decode($str);
return str_replace('__NM_PLUS__', '+', $str); <<<<<<<<<<<< this one is a partial fix
}
How to show the bug?
Make a simple grid with a file upload field in it. Then run your application and upload a file with a + sign in it…
By the way under a windows server various other characters will also fail. Interestingly enough this IS FIXABLE.
O yes a file name with a % in it of course also doesnt work (same bug!).
The upload size limitation of this forum doesnt allow me to upload my application.