aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2024-08-14 09:46:28 +0200
committerGitHub <noreply@github.com>2024-08-14 09:46:28 +0200
commit8c08ac0def557d9fcfa91f0de8d295f449a54983 (patch)
tree45bce9a1cf2a90ba15e3f27457bd85305baa019c
parent4920f9049503cc71b3d202786bb0582e75746d60 (diff)
parent220c6a2bd9f0425481ebcfe496410d96fb8c9d43 (diff)
downloadnextcloud-server-8c08ac0def557d9fcfa91f0de8d295f449a54983.tar.gz
nextcloud-server-8c08ac0def557d9fcfa91f0de8d295f449a54983.zip
Merge pull request #46812 from nextcloud/refactor/files_trashbin/security-attributes
-rw-r--r--apps/files_trashbin/lib/Controller/PreviewController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_trashbin/lib/Controller/PreviewController.php b/apps/files_trashbin/lib/Controller/PreviewController.php
index b5b0dbcc1dd..19eb15b733a 100644
--- a/apps/files_trashbin/lib/Controller/PreviewController.php
+++ b/apps/files_trashbin/lib/Controller/PreviewController.php
@@ -11,6 +11,8 @@ namespace OCA\Files_Trashbin\Controller;
use OCA\Files_Trashbin\Trash\ITrashManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\NoAdminRequired;
+use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\Folder;
@@ -61,9 +63,6 @@ class PreviewController extends Controller {
}
/**
- * @NoAdminRequired
- * @NoCSRFRequired
- *
* Get the preview for a file
*
* @param int $fileId ID of the file
@@ -77,6 +76,8 @@ class PreviewController extends Controller {
* 400: Getting preview is not possible
* 404: Preview not found
*/
+ #[NoAdminRequired]
+ #[NoCSRFRequired]
public function getPreview(
int $fileId = -1,
int $x = 32,