Skip to content

Commit

Permalink
Limit Passkey name length.
Browse files Browse the repository at this point in the history
  • Loading branch information
Syfaro committed Feb 29, 2024
1 parent 7152e4a commit 7ce65b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,10 @@ async fn verify_registration(
.and_then(|name| name.to_str().ok())
.ok_or(Error::Missing)?;

if passkey_name.is_empty() || passkey_name.len() > 128 {
return Err(Error::user_error("Passkey name is empty or too long."));
}

let reg_state = session
.remove_as("reg_state")
.ok_or(Error::Missing)?
Expand Down

0 comments on commit 7ce65b0

Please sign in to comment.