Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/webauthn/authenticate_service.rb')
-rw-r--r--app/services/webauthn/authenticate_service.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/services/webauthn/authenticate_service.rb b/app/services/webauthn/authenticate_service.rb
index 52437a77df8..7855b509595 100644
--- a/app/services/webauthn/authenticate_service.rb
+++ b/app/services/webauthn/authenticate_service.rb
@@ -40,8 +40,8 @@ module Webauthn
# (which is done in #verify_webauthn_credential)
def validate_webauthn_credential(webauthn_credential)
webauthn_credential.type == WebAuthn::TYPE_PUBLIC_KEY &&
- webauthn_credential.raw_id && webauthn_credential.id &&
- webauthn_credential.raw_id == WebAuthn.standard_encoder.decode(webauthn_credential.id)
+ webauthn_credential.raw_id && webauthn_credential.id &&
+ webauthn_credential.raw_id == WebAuthn.standard_encoder.decode(webauthn_credential.id)
end
##
@@ -53,9 +53,10 @@ module Webauthn
rp_id = webauthn_credential.client_extension_outputs['appid'] ? WebAuthn.configuration.origin : URI(WebAuthn.configuration.origin).host
webauthn_credential.response.verify(
encoder.decode(challenge),
- public_key: encoder.decode(stored_credential.public_key),
- sign_count: stored_credential.counter,
- rp_id: rp_id)
+ public_key: encoder.decode(stored_credential.public_key),
+ sign_count: stored_credential.counter,
+ rp_id: rp_id
+ )
end
end
end