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.
This commit is contained in:
Vincent Petry 2015-07-13 17:39:07 +02:00
parent 9a010cc8ce
commit b4998e7d29
1 changed files with 4 additions and 1 deletions

View File

@ -82,6 +82,9 @@ class PublicAuth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
} }
return true; return true;
} else if (\OC::$server->getSession()->exists('public_link_authenticated')
&& \OC::$server->getSession()->get('public_link_authenticated') === $linkItem['id']) {
return true;
} else { } else {
return false; return false;
} }