about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-03-15 04:15:20 +0100
committerGitHub <noreply@github.com>2023-03-15 04:15:20 +0100
commita232a1feb804e22507ca104ca0aaf21a7c70cb26 (patch)
treecbd368766f85667ac793072b0075d124292205b2 /app/controllers
parentcf50667e26853d2d0f78ec1226db84995c4b83f4 (diff)
Fix misleading error code when receiving invalid WebAuthn credentials (#23568)
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb b/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb
index e43818c94..d1ee7dc19 100644
--- a/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb
+++ b/app/controllers/settings/two_factor_authentication/webauthn_credentials_controller.rb
@@ -52,7 +52,7 @@ module Settings
             end
           else
             flash[:error] = I18n.t('webauthn_credentials.create.error')
-            status = :internal_server_error
+            status = :unprocessable_entity
           end
         else
           flash[:error] = t('webauthn_credentials.create.error')