Skip to content

Commit

Permalink
Allow public auth to recognize sesssion
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Vincent Petry committed Aug 19, 2015
1 parent a2d6e2c commit e6f007d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/files_sharing/lib/connector/publicauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ protected function validateUserPass($username, $password) {

}
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;
Expand Down

0 comments on commit e6f007d

Please sign in to comment.