* @NoCSRFRequired
*
* @param string $token
- *
* @return TemplateResponse|RedirectResponse
*/
public function showAuthenticate($token) {
*
* @param string $token
* @param string $path
- *
* @return TemplateResponse
*/
public function showShare($token, $path = '') {
/**
* @PublicPage
* @NoCSRFRequired
+ * @UseSession
+ *
* @param string $token
* @param string $files
* @param string $path
public function downloadShare($token, $files = null, $path = '') {
\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);
// Share is password protected - check whether the user is permitted to access the share