]> granicus.if.org Git - php/commitdiff
Fix bug #62535 - $_SESSION[$key]["cancel_upload"] doesn't work as documented
authorArpad Ray <arraypad@gmail.com>
Thu, 27 Jun 2013 18:05:23 +0000 (19:05 +0100)
committerArpad Ray <arraypad@gmail.com>
Thu, 27 Jun 2013 18:05:23 +0000 (19:05 +0100)
When uploading multiple files, the array in the session where the progress
data is stored (and cancel_upload key is set) was overwritten whenever the
progress data was updated, so pending uploads would proceed anyway.

ext/session/session.c

index d9989ba753f58b73a6871a449b5c8d05b1a0d3c9..a13094741953850584516e9c6d03bc9a25874fa0 100644 (file)
@@ -2366,7 +2366,7 @@ static void php_session_rfc1867_update(php_session_rfc1867_progress *progress, i
        php_session_initialize(TSRMLS_C);
        PS(session_status) = php_session_active;
        IF_SESSION_VARS() {
-               progress->cancel_upload = php_check_cancel_upload(progress TSRMLS_CC);
+               progress->cancel_upload |= php_check_cancel_upload(progress TSRMLS_CC);
                ZEND_SET_SYMBOL_WITH_LENGTH(Z_ARRVAL_P(PS(http_session_vars)), progress->key.c, progress->key.len+1, progress->data, 2, 0);
        }
        php_session_flush(TSRMLS_C);