iliaa Sun Jul 25 15:19:33 2004 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS /php-src/main rfc1867.c Log: MFH: Fixed bug #29369 (Uploaded files with ' or " in their names get their names truncated at those characters). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.707&r2=1.1247.2.708&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.707 php-src/NEWS:1.1247.2.708 --- php-src/NEWS:1.1247.2.707 Thu Jul 22 22:05:54 2004 +++ php-src/NEWS Sun Jul 25 15:19:32 2004 @@ -4,6 +4,8 @@ - Updated PCRE to provide better error handling in certain cases. (Andrei) - NSAPI: added "bucket" parameter to list of non-php.ini-keys of php4_execute for doing performance stats without warnings in server-log. (Uwe Schindler) +- Fixed bug #29369 (Uploaded files with ' or " in their names get their names + truncated at those characters). (Ilia) - Fixed bug #29333 (output_buffering+trans_sess_id can corrupt output). (Ilia) - Fixed bug #29226 (ctype_* functions missing validation of numeric string representations). (Ilia) http://cvs.php.net/diff.php/php-src/main/rfc1867.c?r1=1.122.2.22&r2=1.122.2.23&ty=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.122.2.22 php-src/main/rfc1867.c:1.122.2.23 --- php-src/main/rfc1867.c:1.122.2.22 Wed Jul 21 12:25:28 2004 +++ php-src/main/rfc1867.c Sun Jul 25 15:19:32 2004 @@ -16,7 +16,7 @@ | Jani Taskinen <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: rfc1867.c,v 1.122.2.22 2004/07/21 16:25:28 sesser Exp $ */ +/* $Id: rfc1867.c,v 1.122.2.23 2004/07/25 19:19:32 iliaa Exp $ */ /* * This product includes software developed by the Apache Group @@ -628,6 +628,7 @@ if ((quote = *str) == '"' || quote == '\'') { strend = str + 1; +look_for_quote: while (*strend && *strend != quote) { if (*strend == '\\' && strend[1] && strend[1] == quote) { strend += 2; @@ -635,6 +636,14 @@ ++strend; } } + if (*strend && *strend == quote) { + char p = *(strend + 1); + if (p != '\r' && p != '\n' && p != '\0') { + strend++; + goto look_for_quote; + } + } + res = substring_conf(str + 1, strend - str - 1, quote TSRMLS_CC); if (*strend == quote) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php