We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e460f2c + 6964ad7 commit 2102e8eCopy full SHA for 2102e8e
1 file changed
credentialsd/src/dbus/model.rs
@@ -66,7 +66,7 @@ pub(super) fn create_credential_request_try_into_ctap2(
66
tracing::info!("JSON missing `rp` field");
67
WebAuthnError::TypeError
68
})?;
69
- let user =
+ let mut user =
70
json.get("user")
71
.ok_or_else(|| {
72
tracing::info!("JSON missing `user` field.");
@@ -79,6 +79,13 @@ pub(super) fn create_credential_request_try_into_ctap2(
79
80
})
81
82
+ user.id = URL_SAFE_NO_PAD
83
+ .decode(user.id)
84
+ .map_err(|_| {
85
+ tracing::info!("user ID is not a valid base64url string");
86
+ WebAuthnError::TypeError
87
+ })?
88
+ .into();
89
let other_options =
90
serde_json::from_str::<webauthn::MakeCredentialOptions>(&request_value.to_string())
91
.map_err(|e| {
0 commit comments