Merge pull request #9618 from nextcloud/backport/9515/stable12

[stable12] Regenerate session id after public share auth
This commit is contained in:
Roeland Jago Douma 2018-05-28 09:05:29 +02:00 committed by GitHub
commit 7a121f81b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {
if ($password !== null) {
if ($this->shareManager->checkPassword($share, $password)) {
$this->session->regenerateId();
$this->session->set('public_link_authenticated', (string)$share->getId());
} else {
$this->emitAccessShareHook($share, 403, 'Wrong password');