From ec678820c83ce6206dc7825a9593df05b95e3fb8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 23 Jul 2026 10:24:27 +0200 Subject: [PATCH] fix(onetime-qrcode): Fix onetime QR code with 2FA enable Signed-off-by: Joas Schilling --- core/Controller/AppPasswordController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/Controller/AppPasswordController.php b/core/Controller/AppPasswordController.php index 1dbeaa66a4599..ee8ad99fd2fb2 100644 --- a/core/Controller/AppPasswordController.php +++ b/core/Controller/AppPasswordController.php @@ -16,6 +16,7 @@ use OCP\AppFramework\Http\Attribute\ApiRoute; use OCP\AppFramework\Http\Attribute\BruteForceProtection; use OCP\AppFramework\Http\Attribute\NoAdminRequired; +use OCP\AppFramework\Http\Attribute\NoTwoFactorRequired; use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; use OCP\AppFramework\Http\Attribute\UseSession; use OCP\AppFramework\Http\DataResponse; @@ -204,6 +205,7 @@ public function confirmUserPassword(string $password): DataResponse { * 200: App password returned */ #[NoAdminRequired] + #[NoTwoFactorRequired] #[ApiRoute(verb: 'GET', url: '/getapppassword-onetime', root: '/core')] public function getAppPasswordWithOneTimePassword(): DataResponse { // Only allow with one-time app passwords