mirror of
https://github.com/nextcloud/server.git
synced 2025-02-24 08:56:48 +00:00
refactor(core): Make all attribute arguments named
Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
parent
a94249d1d5
commit
bc5c0262af
7 changed files with 15 additions and 15 deletions
|
@ -168,7 +168,7 @@ class AppPasswordController extends \OCP\AppFramework\OCSController {
|
|||
* 403: Password confirmation failed
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[BruteForceProtection('sudo')]
|
||||
#[BruteForceProtection(action: 'sudo')]
|
||||
#[UseSession]
|
||||
#[ApiRoute(verb: 'PUT', url: '/apppassword/confirm', root: '/core')]
|
||||
public function confirmUserPassword(string $password): DataResponse {
|
||||
|
|
|
@ -274,7 +274,7 @@ class LoginController extends Controller {
|
|||
*/
|
||||
#[NoCSRFRequired]
|
||||
#[PublicPage]
|
||||
#[BruteForceProtection('login')]
|
||||
#[BruteForceProtection(action: 'login')]
|
||||
#[UseSession]
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
|
||||
#[FrontpageRoute(verb: 'POST', url: '/login')]
|
||||
|
@ -387,7 +387,7 @@ class LoginController extends Controller {
|
|||
* 403: Password confirmation failed
|
||||
*/
|
||||
#[NoAdminRequired]
|
||||
#[BruteForceProtection('sudo')]
|
||||
#[BruteForceProtection(action: 'sudo')]
|
||||
#[UseSession]
|
||||
#[NoCSRFRequired]
|
||||
#[FrontpageRoute(verb: 'POST', url: '/login/confirm')]
|
||||
|
|
|
@ -81,8 +81,8 @@ class LostController extends Controller {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[NoCSRFRequired]
|
||||
#[BruteForceProtection('passwordResetEmail')]
|
||||
#[AnonRateLimit(10, 300)]
|
||||
#[BruteForceProtection(action: 'passwordResetEmail')]
|
||||
#[AnonRateLimit(limit: 10, period: 300)]
|
||||
#[FrontpageRoute(verb: 'GET', url: '/lostpassword/reset/form/{token}/{userId}')]
|
||||
public function resetform(string $token, string $userId): TemplateResponse {
|
||||
try {
|
||||
|
@ -144,8 +144,8 @@ class LostController extends Controller {
|
|||
}
|
||||
|
||||
#[PublicPage]
|
||||
#[BruteForceProtection('passwordResetEmail')]
|
||||
#[AnonRateLimit(10, 300)]
|
||||
#[BruteForceProtection(action: 'passwordResetEmail')]
|
||||
#[AnonRateLimit(limit: 10, period: 300)]
|
||||
#[FrontpageRoute(verb: 'POST', url: '/lostpassword/email')]
|
||||
public function email(string $user): JSONResponse {
|
||||
if ($this->config->getSystemValue('lost_password_link', '') !== '') {
|
||||
|
@ -180,8 +180,8 @@ class LostController extends Controller {
|
|||
}
|
||||
|
||||
#[PublicPage]
|
||||
#[BruteForceProtection('passwordResetEmail')]
|
||||
#[AnonRateLimit(10, 300)]
|
||||
#[BruteForceProtection(action: 'passwordResetEmail')]
|
||||
#[AnonRateLimit(limit: 10, period: 300)]
|
||||
#[FrontpageRoute(verb: 'POST', url: '/lostpassword/set/{token}/{userId}')]
|
||||
public function setPassword(string $token, string $userId, string $password, bool $proceed): JSONResponse {
|
||||
if ($this->encryptionManager->isEnabled() && !$proceed) {
|
||||
|
|
|
@ -77,7 +77,7 @@ class OCSController extends \OCP\AppFramework\OCSController {
|
|||
}
|
||||
|
||||
#[PublicPage]
|
||||
#[BruteForceProtection('login')]
|
||||
#[BruteForceProtection(action: 'login')]
|
||||
#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
|
||||
#[ApiRoute(verb: 'POST', url: '/check', root: '/person')]
|
||||
public function personCheck(string $login = '', string $password = ''): DataResponse {
|
||||
|
|
|
@ -53,7 +53,7 @@ class ProfileApiController extends OCSController {
|
|||
*/
|
||||
#[NoAdminRequired]
|
||||
#[PasswordConfirmationRequired]
|
||||
#[UserRateLimit(40, 600)]
|
||||
#[UserRateLimit(limit: 40, period: 600)]
|
||||
#[ApiRoute(verb: 'PUT', url: '/{targetUserId}', root: '/profile')]
|
||||
public function setVisibility(string $targetUserId, string $paramId, string $visibility): DataResponse {
|
||||
$requestingUser = $this->userSession->getUser();
|
||||
|
|
|
@ -62,8 +62,8 @@ class TranslationApiController extends \OCP\AppFramework\OCSController {
|
|||
* 412: Translating is not possible
|
||||
*/
|
||||
#[PublicPage]
|
||||
#[UserRateLimit(25, 120)]
|
||||
#[AnonRateLimit(10, 120)]
|
||||
#[UserRateLimit(limit: 25, period: 120)]
|
||||
#[AnonRateLimit(limit: 10, period: 120)]
|
||||
#[ApiRoute(verb: 'POST', url: '/translate', root: '/translation')]
|
||||
public function translate(string $text, ?string $fromLanguage, string $toLanguage): DataResponse {
|
||||
try {
|
||||
|
|
|
@ -40,7 +40,7 @@ class WipeController extends Controller {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[NoCSRFRequired]
|
||||
#[AnonRateLimit(10, 300)]
|
||||
#[AnonRateLimit(limit: 10, period: 300)]
|
||||
#[FrontpageRoute(verb: 'POST', url: '/core/wipe/check')]
|
||||
public function checkWipe(string $token): JSONResponse {
|
||||
try {
|
||||
|
@ -69,7 +69,7 @@ class WipeController extends Controller {
|
|||
*/
|
||||
#[PublicPage]
|
||||
#[NoCSRFRequired]
|
||||
#[AnonRateLimit(10, 300)]
|
||||
#[AnonRateLimit(limit: 10, period: 300)]
|
||||
#[FrontpageRoute(verb: 'POST', url: '/core/wipe/success')]
|
||||
public function wipeDone(string $token): JSONResponse {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue