mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
FIX: Embarassing algoriths typo -> algorithms for security keys (#9126)
This commit is contained in:
@ -38,7 +38,7 @@ export default Controller.extend(ModalFunctionality, {
|
|||||||
id: response.rp_id,
|
id: response.rp_id,
|
||||||
name: response.rp_name
|
name: response.rp_name
|
||||||
},
|
},
|
||||||
supported_algoriths: response.supported_algoriths,
|
supported_algorithms: response.supported_algorithms,
|
||||||
user_secure_id: response.user_secure_id,
|
user_secure_id: response.user_secure_id,
|
||||||
existing_active_credential_ids:
|
existing_active_credential_ids:
|
||||||
response.existing_active_credential_ids
|
response.existing_active_credential_ids
|
||||||
@ -71,7 +71,7 @@ export default Controller.extend(ModalFunctionality, {
|
|||||||
displayName: this.model.username_lower,
|
displayName: this.model.username_lower,
|
||||||
name: 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 };
|
return { type: "public-key", alg: alg };
|
||||||
}),
|
}),
|
||||||
excludeCredentials: this.existing_active_credential_ids.map(
|
excludeCredentials: this.existing_active_credential_ids.map(
|
||||||
|
@ -1197,7 +1197,7 @@ class UsersController < ApplicationController
|
|||||||
challenge: challenge_session.challenge,
|
challenge: challenge_session.challenge,
|
||||||
rp_id: challenge_session.rp_id,
|
rp_id: challenge_session.rp_id,
|
||||||
rp_name: challenge_session.rp_name,
|
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,
|
user_secure_id: current_user.create_or_fetch_secure_identifier,
|
||||||
existing_active_credential_ids: current_user.second_factor_security_key_credential_ids
|
existing_active_credential_ids: current_user.second_factor_security_key_credential_ids
|
||||||
)
|
)
|
||||||
|
@ -3770,7 +3770,7 @@ describe UsersController do
|
|||||||
expect(response_parsed["user_secure_id"]).to eq(
|
expect(response_parsed["user_secure_id"]).to eq(
|
||||||
user.reload.create_or_fetch_secure_identifier
|
user.reload.create_or_fetch_secure_identifier
|
||||||
)
|
)
|
||||||
expect(response_parsed["supported_algoriths"]).to eq(
|
expect(response_parsed["supported_algorithms"]).to eq(
|
||||||
::Webauthn::SUPPORTED_ALGORITHMS
|
::Webauthn::SUPPORTED_ALGORITHMS
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -26,7 +26,7 @@ acceptance("User Preferences", {
|
|||||||
"a6d393d12654c130b2273e68ca25ca232d1d7f4c2464c2610fb8710a89d4",
|
"a6d393d12654c130b2273e68ca25ca232d1d7f4c2464c2610fb8710a89d4",
|
||||||
rp_id: "localhost",
|
rp_id: "localhost",
|
||||||
rp_name: "Discourse",
|
rp_name: "Discourse",
|
||||||
supported_algoriths: [-7, -257]
|
supported_algorithms: [-7, -257]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user