we no longer need to keep the session open for encryption
This commit is contained in:
parent
917bef39b7
commit
1d33503487
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
\OC::$server->getSession()->close();
|
||||||
|
|
||||||
// Firefox and Konqueror tries to download application/json for me. --Arthur
|
// Firefox and Konqueror tries to download application/json for me. --Arthur
|
||||||
OCP\JSON::setContentTypeHeader('text/plain');
|
OCP\JSON::setContentTypeHeader('text/plain');
|
||||||
|
|
||||||
|
@ -64,13 +66,7 @@ if (empty($_POST['dirToken'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OCP\JSON::callCheck();
|
OCP\JSON::callCheck();
|
||||||
if (!\OCP\App::isEnabled('files_encryption')) {
|
|
||||||
// encryption app need to create keys later, so can't close too early
|
|
||||||
\OC::$server->getSession()->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// get array with current storage stats (e.g. max file size)
|
// get array with current storage stats (e.g. max file size)
|
||||||
$storageStats = \OCA\Files\Helper::buildFileStorageStatistics($dir);
|
$storageStats = \OCA\Files\Helper::buildFileStorageStatistics($dir);
|
||||||
|
|
|
@ -205,7 +205,6 @@ class ShareController extends Controller {
|
||||||
/**
|
/**
|
||||||
* @PublicPage
|
* @PublicPage
|
||||||
* @NoCSRFRequired
|
* @NoCSRFRequired
|
||||||
* @UseSession
|
|
||||||
*
|
*
|
||||||
* @param string $token
|
* @param string $token
|
||||||
* @param string $files
|
* @param string $files
|
||||||
|
@ -215,12 +214,6 @@ class ShareController extends Controller {
|
||||||
public function downloadShare($token, $files = null, $path = '') {
|
public function downloadShare($token, $files = null, $path = '') {
|
||||||
\OC_User::setIncognitoMode(true);
|
\OC_User::setIncognitoMode(true);
|
||||||
|
|
||||||
// FIXME: Use DI once there is a suitable class
|
|
||||||
if (!\OCP\App::isEnabled('files_encryption')) {
|
|
||||||
// encryption app requires the session to store the keys in
|
|
||||||
\OC::$server->getSession()->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
$linkItem = OCP\Share::getShareByToken($token, false);
|
$linkItem = OCP\Share::getShareByToken($token, false);
|
||||||
|
|
||||||
// Share is password protected - check whether the user is permitted to access the share
|
// Share is password protected - check whether the user is permitted to access the share
|
||||||
|
|
Loading…
Reference in New Issue