Regenerate session id after public share auth

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-05-17 22:07:20 +02:00
parent 84988e4f89
commit cb211f0434
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 0 deletions

View File

@ -201,6 +201,7 @@ class ShareController extends Controller {
private function linkShareAuth(\OCP\Share\IShare $share, $password = null) { private function linkShareAuth(\OCP\Share\IShare $share, $password = null) {
if ($password !== null) { if ($password !== null) {
if ($this->shareManager->checkPassword($share, $password)) { if ($this->shareManager->checkPassword($share, $password)) {
$this->session->regenerateId();
$this->session->set('public_link_authenticated', (string)$share->getId()); $this->session->set('public_link_authenticated', (string)$share->getId());
} else { } else {
$this->emitAccessShareHook($share, 403, 'Wrong password'); $this->emitAccessShareHook($share, 403, 'Wrong password');