php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62535 $_SESSION[$key]["cancel_upload"] doesn't work as documented
Submitted: 2012-07-11 16:56 UTC Modified: 2013-06-27 18:58 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: danny at tibibi dot com Assigned: arpad (profile)
Status: Closed Package: Session related
PHP Version: 5.4.4 OS: Windows Server 2008
Private report: No CVE-ID: None
 [2012-07-11 16:56 UTC] danny at tibibi dot com
Description:
------------
The documentation - http://us3.php.net/manual/en/session.upload-progress.php -for the Session Upload Progress feature says that if you set $_SESSION[$key]["cancel_upload"] to TRUE, then it will cancel the current file being processed, and all pending files.

This is not what I am experiencing. Instead, it cancels the current file, but the pending files still go through, unless you set $_SESSION[$key]["cancel_upload"] to TRUE again and again at the time that each file is being processed.

Also, what I understood from the documentation is that if you set $_SESSION[$key]["cancel_upload"] to TRUE, then it stops the current file and all pending files, therefore stopping the request from processing any further. I'm not sure if I'm right in assuming this, but it is definitely not the case. Instead, the complete request finishes (this could be long if the files are large), and then the $_FILES array has its error set to UPLOAD_ERR_EXTENSION for all files that were canceled.

It would be nice if setting $_SESSION[$key]["cancel_upload"] to TRUE actually stopped the request entirely from being processed any further, so this way it could save the user from waiting long periods of time for nothing.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-27 18:25 UTC] arpad@php.net
Automatic comment on behalf of arraypad@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ce8c023910562e84d5e00825a1e784174bcb3f1b
Log: Fix bug #62535 - $_SESSION[$key]["cancel_upload"] doesn't work as documented
 [2013-06-27 18:25 UTC] arpad@php.net
-Status: Open +Status: Closed
 [2013-06-27 18:58 UTC] arpad@php.net
-Assigned To: +Assigned To: arpad
 [2013-06-27 18:58 UTC] arpad@php.net
Regarding stopping the request entirely, we have to wait until the request is finished (and continue to process it in case there's more form data) before sending the response so that's not possible.
 [2014-10-07 23:18 UTC] stas@php.net
Automatic comment on behalf of arraypad@gmail.com
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=ce8c023910562e84d5e00825a1e784174bcb3f1b
Log: Fix bug #62535 - $_SESSION[$key]["cancel_upload"] doesn't work as documented
 [2014-10-07 23:29 UTC] stas@php.net
Automatic comment on behalf of arraypad@gmail.com
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=ce8c023910562e84d5e00825a1e784174bcb3f1b
Log: Fix bug #62535 - $_SESSION[$key]["cancel_upload"] doesn't work as documented
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC