summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller/ShareInfoController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareInfoController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareInfoController.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareInfoController.php b/apps/files_sharing/lib/Controller/ShareInfoController.php
index efec331c540..df93b485e11 100644
--- a/apps/files_sharing/lib/Controller/ShareInfoController.php
+++ b/apps/files_sharing/lib/Controller/ShareInfoController.php
@@ -9,6 +9,9 @@ use OCA\Files_External\NotFoundException;
use OCA\Files_Sharing\ResponseDefinitions;
use OCP\AppFramework\ApiController;
use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\BruteForceProtection;
+use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\JSONResponse;
use OCP\Constants;
use OCP\Files\File;
@@ -42,10 +45,6 @@ class ShareInfoController extends ApiController {
}
/**
- * @PublicPage
- * @NoCSRFRequired
- * @BruteForceProtection(action=shareinfo)
- *
* Get the info about a share
*
* @param string $t Token of the share
@@ -58,6 +57,9 @@ class ShareInfoController extends ApiController {
* 403: Getting share info is not allowed
* 404: Share not found
*/
+ #[PublicPage]
+ #[NoCSRFRequired]
+ #[BruteForceProtection(action: 'shareinfo')]
public function info(string $t, ?string $password = null, ?string $dir = null, int $depth = -1): JSONResponse {
try {
$share = $this->shareManager->getShareByToken($t);