nextcloud/apps/files
Daniel Calviño Sánchez 375a55b0ad
Fix race condition when preparing upload folder
Before any upload is submitted the upload is registered in a list of
known uploads; this is needed to retrieve the upload object at several
points of the upload process. When a chunked upload is submitted first a
directory to upload all the chunks is created and, once that is done,
the chunks are sent; in order to send a chunk the upload object needs to
be retrieved from the list of known uploads.

When all the active uploads were finished the list of known uploads was
cleared. However, an upload is not active until it actually starts
sending the data, so while waiting for the upload directory to be
created the upload is already in the list of known uploads yet not
active. Due to all this, if the active uploads finished while another
pending upload was waiting for the upload directory to be created that
pending upload would be removed from the list of known uploads too, and
once the directory was created and thus the chunks were sent a field of
a null upload object would be accessed thus causing a failure.

Instead of removing all the known uploads at once when the active
uploads finish now each upload is explicitly removed when it finishes.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-22 20:38:11 +02:00
..
ajax Move calls to \OCP\JSON to private \OC_JSON 2018-03-22 13:19:29 +01:00
appinfo Remove unused download.php 2018-03-19 11:45:48 +01:00
composer Move storagestats endpoint to proper controller 2018-03-13 12:44:48 +01:00
css Ensure proper color contrast according to WCAG AA 2018-04-18 15:38:30 +02:00
img Add some whitespace around change.svg icon 2018-02-22 15:46:21 +01:00
js Fix race condition when preparing upload folder 2018-04-22 20:38:11 +02:00
l10n [tx-robot] updated from transifex 2018-04-22 00:11:51 +00:00
lib Show the new dav url in the web UI 2018-04-05 13:59:45 +02:00
templates Show the new dav url in the web UI 2018-04-05 13:59:45 +02:00
tests Show the new dav url in the web UI 2018-04-05 13:59:45 +02:00
list.php Remove upload_limit in files app as it is not needed with PUT upload (#26069) 2016-11-02 20:43:35 +01:00
recentlist.php Change @georgehrke's email 2017-11-06 20:38:59 +01:00
simplelist.php Fix apps/ 2016-07-21 18:13:57 +02:00