diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-07-13 17:39:07 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-28 11:52:04 +0200 |
commit | b4998e7d299a3a7727878f95df41343e3b5ed426 (patch) | |
tree | c722830c34b6f1c8d9ce855f6802df600736ffce | |
parent | 9a010cc8ce281650038cd1444f63a02245eea523 (diff) | |
download | nextcloud-server-b4998e7d299a3a7727878f95df41343e3b5ed426.tar.gz nextcloud-server-b4998e7d299a3a7727878f95df41343e3b5ed426.zip |
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.php | 5 |
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; |