]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix public upload to not close session when encryption is on
authorVincent Petry <pvince81@owncloud.com>
Mon, 24 Mar 2014 16:34:37 +0000 (17:34 +0100)
committerVincent Petry <pvince81@owncloud.com>
Mon, 24 Mar 2014 16:34:37 +0000 (17:34 +0100)
The encryption app needs to create keys when uploading files, so the
session needs to be kept open in such case.

apps/files/ajax/upload.php

index 37c600e91da384b270d2883b8aa8cec9e4eecc76..4ed51c527759b49d4626016e44f36e69a3e72083 100644 (file)
@@ -58,7 +58,10 @@ if (empty($_POST['dirToken'])) {
 
 
 OCP\JSON::callCheck();
-\OC::$session->close();
+if (!\OCP\App::isEnabled('files_encryption')) {
+       // encryption app need to create keys later, so can't close too early
+       \OC::$session->close();
+}
 
 
 // get array with current storage stats (e.g. max file size)