From c57c3c15734c153d541247cc5fca198cb0e4f7b6 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 25 Jul 2024 13:24:59 +0200 Subject: refactor(core): Replace security annotations with respective attributes Signed-off-by: provokateurin --- core/Controller/CssController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/Controller/CssController.php') diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php index c6a24784286..345b70fe2d3 100644 --- a/core/Controller/CssController.php +++ b/core/Controller/CssController.php @@ -12,7 +12,9 @@ use OC\Files\AppData\Factory; use OCP\AppFramework\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\FileDisplayResponse; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Http\Response; @@ -39,14 +41,14 @@ class CssController extends Controller { } /** - * @PublicPage - * @NoCSRFRequired * @NoSameSiteCookieRequired * * @param string $fileName css filename with extension * @param string $appName css folder name * @return FileDisplayResponse|NotFoundResponse */ + #[PublicPage] + #[NoCSRFRequired] #[FrontpageRoute(verb: 'GET', url: '/css/{appName}/{fileName}')] public function getCss(string $fileName, string $appName): Response { try { -- cgit v1.2.3