diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2024-07-26 07:13:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 07:13:50 +0200 |
commit | 41f7fa6840a13cb2cb1c9d4ac1d3eca6012e22de (patch) | |
tree | ecf42605ff4a4724431f7dc80bb8d150b749811a /apps/comments/lib/Controller/NotificationsController.php | |
parent | a9b77c3d129f11c90052120eaa28f31681c49823 (diff) | |
parent | bec0653d2a5b6c70ee92ff56c3090b7fa33f98bd (diff) | |
download | nextcloud-server-41f7fa6840a13cb2cb1c9d4ac1d3eca6012e22de.tar.gz nextcloud-server-41f7fa6840a13cb2cb1c9d4ac1d3eca6012e22de.zip |
Merge pull request #46745 from nextcloud/refactor/comments/security-attributes
Diffstat (limited to 'apps/comments/lib/Controller/NotificationsController.php')
-rw-r--r-- | apps/comments/lib/Controller/NotificationsController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/comments/lib/Controller/NotificationsController.php b/apps/comments/lib/Controller/NotificationsController.php index 408efc46973..a3228247884 100644 --- a/apps/comments/lib/Controller/NotificationsController.php +++ b/apps/comments/lib/Controller/NotificationsController.php @@ -7,7 +7,9 @@ namespace OCA\Comments\Controller; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\Attribute\NoCSRFRequired; use OCP\AppFramework\Http\Attribute\OpenAPI; +use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Http\RedirectResponse; use OCP\Comments\IComment; @@ -37,9 +39,6 @@ class NotificationsController extends Controller { } /** - * @PublicPage - * @NoCSRFRequired - * * View a notification * * @param string $id ID of the notification @@ -49,6 +48,8 @@ class NotificationsController extends Controller { * 303: Redirected to notification * 404: Notification not found */ + #[PublicPage] + #[NoCSRFRequired] public function view(string $id): RedirectResponse|NotFoundResponse { $currentUser = $this->userSession->getUser(); if (!$currentUser instanceof IUser) { |