summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Kalowsky <kalowsky@php.net>2002-08-16 19:34:43 +0000
committerDan Kalowsky <kalowsky@php.net>2002-08-16 19:34:43 +0000
commit6c22f90b4a3d24a8da83e78f8eef97cba6c05197 (patch)
tree9e9b4993451155ad683358680de9c6551701a704
parent26e044a1438587b946a07a1839d663a16d836d42 (diff)
downloadphp-git-6c22f90b4a3d24a8da83e78f8eef97cba6c05197.tar.gz
Fix for bug #18792 submitted by t.bubeck@reinform.de
# talked this over with sterling and he believes it shouldn't break anything # although there might be a need/desire to check for both ',' and ';'
-rw-r--r--main/rfc1867.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/rfc1867.c b/main/rfc1867.c
index dd0651abc5..83d981bf2d 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -617,7 +617,7 @@ static char *multipart_buffer_read_body(multipart_buffer *self TSRMLS_DC)
SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
{
- char *boundary, *s=NULL, *start_arr=NULL, *array_index=NULL;
+ char *boundary, *s=NULL, *boundary_end = NULL, *start_arr=NULL, *array_index=NULL;
char *temp_filename=NULL, *lbuf=NULL, *abuf=NULL;
int boundary_len=0, total_bytes=0, cancel_upload=0, is_arr_upload=0, array_len=0, max_file_size=0;
zval *http_post_files=NULL;
@@ -638,6 +638,11 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
sapi_module.sapi_error(E_WARNING, "Missing boundary in multipart/form-data POST data");
return;
}
+
+ /* search for the end of the boundary */
+ boundary_end = strchr(boundary, ',');
+ if (boundary_end ) *boundary_end = 0;
+
boundary++;
boundary_len = strlen(boundary);