diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-05-15 10:38:55 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2024-01-09 10:56:06 +0100 |
commit | 7b6a650b6e09b07d4b85a4ae84eb64a6c32b217f (patch) | |
tree | f5e479b0bca0a027ef289135c8216cda10f82b14 /apps/files_sharing/lib/Controller/ShareController.php | |
parent | fdc64ea2f527d25c382901ed906f71fca89fd1b3 (diff) | |
download | nextcloud-server-7b6a650b6e09b07d4b85a4ae84eb64a6c32b217f.tar.gz nextcloud-server-7b6a650b6e09b07d4b85a4ae84eb64a6c32b217f.zip |
feat: public dav endpoint v2
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareController.php')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 835d08c446c..bd9cdffa83d 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -46,6 +46,7 @@ namespace OCA\Files_Sharing\Controller; use OC\Security\CSP\ContentSecurityPolicy; use OC_Files; use OC_Util; +use OCA\DAV\Connector\Sabre\PublicAuth; use OCA\FederatedFileSharing\FederatedShareProvider; use OCA\Files_Sharing\Activity\Providers\Downloads; use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent; @@ -222,8 +223,12 @@ class ShareController extends AuthPublicShareController { } protected function authSucceeded() { + if ($this->share === null) { + throw new NotFoundException(); + } + // For share this was always set so it is still used in other apps - $this->session->set('public_link_authenticated', (string)$this->share->getId()); + $this->session->set(PublicAuth::DAV_AUTHENTICATED, $this->share->getId()); } protected function authFailed() { |