sesser          Fri Sep 29 10:05:34 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/main       rfc1867.c 
  Log:
  If one name is disallowed don't drop all files
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/rfc1867.c?r1=1.173.2.1.2.4&r2=1.173.2.1.2.5&diff_format=u
Index: php-src/main/rfc1867.c
diff -u php-src/main/rfc1867.c:1.173.2.1.2.4 
php-src/main/rfc1867.c:1.173.2.1.2.5
--- php-src/main/rfc1867.c:1.173.2.1.2.4        Tue Sep 19 11:34:19 2006
+++ php-src/main/rfc1867.c      Fri Sep 29 10:05:34 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: rfc1867.c,v 1.173.2.1.2.4 2006/09/19 11:34:19 sesser Exp $ */
+/* $Id: rfc1867.c,v 1.173.2.1.2.5 2006/09/29 10:05:34 sesser Exp $ */
 
 /*
  *  This product includes software developed by the Apache Group
@@ -1025,14 +1025,13 @@
                                }
                        }
                        
-                       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 @@
                                                efree(temp_filename);
                                        }
                                        temp_filename="";
+                                       efree(param);
+                                       efree(filename);
+                                       continue;
                                }
                        }
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to