From: Stefan Esser Date: Fri, 29 Sep 2006 10:05:34 +0000 (+0000) Subject: If one name is disallowed don't drop all files X-Git-Tag: php-5.2.0RC5~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abfc08dc82d4439c73d0ee48107767acb172ea04;p=php If one name is disallowed don't drop all files --- diff --git a/main/rfc1867.c b/main/rfc1867.c index 778b7455fb..d0e1201611 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -1025,14 +1025,13 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) } } - if (php_rfc1867_callback != NULL) { + if (!skip_upload && php_rfc1867_callback != NULL) { multipart_event_file_start event_file_start; event_file_start.post_bytes_processed = SG(read_post_bytes); event_file_start.name = param; event_file_start.filename = &filename; if (php_rfc1867_callback(MULTIPART_EVENT_FILE_START, &event_file_start, &event_extra_data TSRMLS_CC) == FAILURE) { - skip_upload = 1; if (temp_filename) { if (cancel_upload != UPLOAD_ERROR_E) { /* file creation failed */ close(fd); @@ -1041,6 +1040,9 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) efree(temp_filename); } temp_filename=""; + efree(param); + efree(filename); + continue; } }