summaryrefslogtreecommitdiff
path: root/main/rfc1867.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-07-25 19:19:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-07-25 19:19:26 +0000
commit86efab2cc4d6205573ee6adbd63764593ad01dbb (patch)
tree45dffe54f20a2b5b1aa79132d1cdcb6120296a1d /main/rfc1867.c
parentaae7a83df4591842035adc34b1dfc9fcbb1dd206 (diff)
downloadphp-git-86efab2cc4d6205573ee6adbd63764593ad01dbb.tar.gz
Fixed bug #29369 (Uploaded files with ' or " in their names get their names
truncated at those characters).
Diffstat (limited to 'main/rfc1867.c')
-rw-r--r--main/rfc1867.c9
1 files changed, 9 insertions, 0 deletions
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) {