Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-07-13 18:39:07 +0300
committerVincent Petry <pvince81@owncloud.com>2015-10-16 14:50:39 +0300
commitdf4348674b23d4be6764c31cdfb3a71774eed763 (patch)
tree159d83923d589e83478820cdb029195e86cebaa2
parent923e6ca1bf1c26481ced77ded4cf04ad969c13ac (diff)
Allow public auth to recognize sesssion
When a public link password has been input, its auth is stored in the session. This fix makes it possible to recognize the session when using public webdav from the files UI.
-rw-r--r--apps/files_sharing/lib/connector/publicauth.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/connector/publicauth.php b/apps/files_sharing/lib/connector/publicauth.php
index b1c269867f5..9d1bf391560 100644
--- a/apps/files_sharing/lib/connector/publicauth.php
+++ b/apps/files_sharing/lib/connector/publicauth.php
@@ -82,10 +82,13 @@ class PublicAuth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
}
return true;
+ } else if (\OC::$server->getSession()->exists('public_link_authenticated')
+ && \OC::$server->getSession()->get('public_link_authenticated') === $linkItem['id']) {
+ return true;
} else {
return false;
}
- } elseif ($linkItem['share_type'] == \OCP\Share::SHARE_TYPE_REMOTE) {
+ } else if ($linkItem['share_type'] == \OCP\Share::SHARE_TYPE_REMOTE) {
return true;
} else {
return false;