aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-07-25 13:24:59 +0200
committerprovokateurin <kate@provokateurin.de>2024-07-26 07:30:45 +0200
commitc57c3c15734c153d541247cc5fca198cb0e4f7b6 (patch)
tree2cccda08d45230601f8bb5f1e74b74195d826692 /lib/public/AppFramework
parent41f7fa6840a13cb2cb1c9d4ac1d3eca6012e22de (diff)
downloadnextcloud-server-c57c3c15734c153d541247cc5fca198cb0e4f7b6.tar.gz
nextcloud-server-c57c3c15734c153d541247cc5fca198cb0e4f7b6.zip
refactor(core): Replace security annotations with respective attributes
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/public/AppFramework')
-rw-r--r--lib/public/AppFramework/ApiController.php5
-rw-r--r--lib/public/AppFramework/AuthPublicShareController.php7
2 files changed, 2 insertions, 10 deletions
diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php
index da1152090c6..d3c83005ad1 100644
--- a/lib/public/AppFramework/ApiController.php
+++ b/lib/public/AppFramework/ApiController.php
@@ -7,6 +7,7 @@
*/
namespace OCP\AppFramework;
+use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\Response;
@@ -51,13 +52,11 @@ abstract class ApiController extends Controller {
* This method implements a preflighted cors response for you that you can
* link to for the options request
*
- * @NoAdminRequired
- * @NoCSRFRequired
- * @PublicPage
* @since 7.0.0
*/
#[NoCSRFRequired]
#[PublicPage]
+ #[NoAdminRequired]
public function preflightedCors() {
if (isset($this->request->server['HTTP_ORIGIN'])) {
$origin = $this->request->server['HTTP_ORIGIN'];
diff --git a/lib/public/AppFramework/AuthPublicShareController.php b/lib/public/AppFramework/AuthPublicShareController.php
index d6c088d4a0c..9c912d0e9a6 100644
--- a/lib/public/AppFramework/AuthPublicShareController.php
+++ b/lib/public/AppFramework/AuthPublicShareController.php
@@ -46,9 +46,6 @@ abstract class AuthPublicShareController extends PublicShareController {
}
/**
- * @PublicPage
- * @NoCSRFRequired
- *
* Show the authentication page
* The form has to submit to the authenticate method route
*
@@ -125,10 +122,6 @@ abstract class AuthPublicShareController extends PublicShareController {
}
/**
- * @UseSession
- * @PublicPage
- * @BruteForceProtection(action=publicLinkAuth)
- *
* Authenticate the share
*
* @since 14.0.0