diff options
Diffstat (limited to 'core/Controller/ErrorController.php')
-rw-r--r-- | core/Controller/ErrorController.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/core/Controller/ErrorController.php b/core/Controller/ErrorController.php index 573ac4e218f..55925ffc941 100644 --- a/core/Controller/ErrorController.php +++ b/core/Controller/ErrorController.php @@ -11,15 +11,15 @@ namespace OC\Core\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\FrontpageRoute; +use OCP\AppFramework\Http\Attribute\NoCSRFRequired; use OCP\AppFramework\Http\Attribute\OpenAPI; +use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\TemplateResponse; #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] class ErrorController extends \OCP\AppFramework\Controller { - /** - * @PublicPage - * @NoCSRFRequired - */ + #[PublicPage] + #[NoCSRFRequired] #[FrontpageRoute(verb: 'GET', url: 'error/403')] public function error403(): TemplateResponse { $response = new TemplateResponse( @@ -32,10 +32,8 @@ class ErrorController extends \OCP\AppFramework\Controller { return $response; } - /** - * @PublicPage - * @NoCSRFRequired - */ + #[PublicPage] + #[NoCSRFRequired] #[FrontpageRoute(verb: 'GET', url: 'error/404')] public function error404(): TemplateResponse { $response = new TemplateResponse( |