FIX: Embarassing algoriths typo -> algorithms for security keys (#9126)

This commit is contained in:
Martin Brennan 2020-03-09 09:22:08 +10:00 committed by GitHub
parent 20cfa7b810
commit baea65e4bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ export default Controller.extend(ModalFunctionality, {
id: response.rp_id,
name: response.rp_name
},
supported_algoriths: response.supported_algoriths,
supported_algorithms: response.supported_algorithms,
user_secure_id: response.user_secure_id,
existing_active_credential_ids:
response.existing_active_credential_ids
@ -71,7 +71,7 @@ export default Controller.extend(ModalFunctionality, {
displayName: this.model.username_lower,
name: this.model.username_lower
},
pubKeyCredParams: this.supported_algoriths.map(alg => {
pubKeyCredParams: this.supported_algorithms.map(alg => {
return { type: "public-key", alg: alg };
}),
excludeCredentials: this.existing_active_credential_ids.map(

View File

@ -1197,7 +1197,7 @@ class UsersController < ApplicationController
challenge: challenge_session.challenge,
rp_id: challenge_session.rp_id,
rp_name: challenge_session.rp_name,
supported_algoriths: ::Webauthn::SUPPORTED_ALGORITHMS,
supported_algorithms: ::Webauthn::SUPPORTED_ALGORITHMS,
user_secure_id: current_user.create_or_fetch_secure_identifier,
existing_active_credential_ids: current_user.second_factor_security_key_credential_ids
)

View File

@ -3770,7 +3770,7 @@ describe UsersController do
expect(response_parsed["user_secure_id"]).to eq(
user.reload.create_or_fetch_secure_identifier
)
expect(response_parsed["supported_algoriths"]).to eq(
expect(response_parsed["supported_algorithms"]).to eq(
::Webauthn::SUPPORTED_ALGORITHMS
)
end

View File

@ -26,7 +26,7 @@ acceptance("User Preferences", {
"a6d393d12654c130b2273e68ca25ca232d1d7f4c2464c2610fb8710a89d4",
rp_id: "localhost",
rp_name: "Discourse",
supported_algoriths: [-7, -257]
supported_algorithms: [-7, -257]
});
});