Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
1d335034
Commit
1d335034
authored
Nov 25, 2014
by
Bjoern Schiessle
Browse files
we no longer need to keep the session open for encryption
parent
917bef39
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/files/ajax/upload.php
View file @
1d335034
<?php
\
OC
::
$server
->
getSession
()
->
close
();
// Firefox and Konqueror tries to download application/json for me. --Arthur
OCP\JSON
::
setContentTypeHeader
(
'text/plain'
);
...
...
@@ -64,13 +66,7 @@ if (empty($_POST['dirToken'])) {
}
}
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)
$storageStats
=
\
OCA\Files\Helper
::
buildFileStorageStatistics
(
$dir
);
...
...
apps/files_sharing/lib/controllers/sharecontroller.php
View file @
1d335034
...
...
@@ -205,7 +205,6 @@ class ShareController extends Controller {
/**
* @PublicPage
* @NoCSRFRequired
* @UseSession
*
* @param string $token
* @param string $files
...
...
@@ -215,12 +214,6 @@ class ShareController extends Controller {
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
...
...
@@ -246,7 +239,7 @@ class ShareController extends Controller {
}
// FIXME: The exit is required here because otherwise the AppFramework is trying to add headers as well
// after dispatching the request which results in a "Cannot modify header information" notice.
// after dispatching the request which results in a "Cannot modify header information" notice.
OC_Files
::
get
(
$originalSharePath
,
$files_list
,
$_SERVER
[
'REQUEST_METHOD'
]
==
'HEAD'
);
exit
();
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment