mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
Fixed bug #29369 (Uploaded files with ' or " in their names get their names
truncated at those characters).
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user