diff options
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/PublicAuth.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Server.php | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/PublicAuth.php b/apps/dav/lib/Connector/PublicAuth.php index 9b386c7609d..38d91f086c7 100644 --- a/apps/dav/lib/Connector/PublicAuth.php +++ b/apps/dav/lib/Connector/PublicAuth.php @@ -98,7 +98,7 @@ class PublicAuth extends AbstractBasic { if ($this->shareManager->checkPassword($share, $password)) { return true; } else if ($this->session->exists('public_link_authenticated') - && $this->session->get('public_link_authenticated') === $share->getId()) { + && $this->session->get('public_link_authenticated') === (string)$share->getId()) { return true; } else { if (in_array('XMLHttpRequest', explode(',', $this->request->getHeader('X-Requested-With')))) { diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 0715d39049c..73a07072d3c 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -72,13 +72,16 @@ class Server { $this->server->setBaseUri($this->baseUri); $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig())); - $authPlugin = new Plugin($authBackend, 'ownCloud'); + $authPlugin = new Plugin(); $this->server->addPlugin($authPlugin); // allow setup of additional auth backends $event = new SabrePluginEvent($this->server); $dispatcher->dispatch('OCA\DAV\Connector\Sabre::authInit', $event); + // because we are throwing exceptions this plugin has to be the last one + $authPlugin->addBackend($authBackend); + // debugging if(\OC::$server->getConfig()->getSystemValue('debug', false)) { $this->server->addPlugin(new \Sabre\DAV\Browser\Plugin()); |