From: Ilia Alshanetsky Date: Sun, 25 Jul 2004 19:19:28 +0000 (+0000) Subject: MFH: Fixed bug #29369 (Uploaded files with ' or " in their names get their X-Git-Tag: php-5.0.1RC1~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7adc26fd8b96cee8d81b13ef48bf41776f1815ba;p=php MFH: Fixed bug #29369 (Uploaded files with ' or " in their names get their names truncated at those characters). --- diff --git a/main/rfc1867.c b/main/rfc1867.c index c810688434..c373639a0f 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -632,6 +632,7 @@ static char *php_ap_getword_conf(char **line TSRMLS_DC) if ((quote = *str) == '"' || quote == '\'') { strend = str + 1; +look_for_quote: while (*strend && *strend != quote) { if (*strend == '\\' && strend[1] && strend[1] == quote) { strend += 2; @@ -639,6 +640,14 @@ static char *php_ap_getword_conf(char **line TSRMLS_DC) ++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) {