Addressed review comments

This commit is contained in:
CEbbinghaus 2025-02-14 14:47:18 +11:00
parent 54e22cd917
commit d19f49af3f
No known key found for this signature in database
2 changed files with 0 additions and 16 deletions
server
core/src/https
lib/src/credential

View file

@ -1397,13 +1397,6 @@ pub async fn credential_update_update(
}
};
if matches!(scr, CURequest::TotpVerify(_, ref label) if label.trim().is_empty()) {
// I'd really rather have a 400 here. Do I add a WebError::HttpError(u16, String)?
return Err(WebError::InternalServerError(
"Label must not be empty".into(),
));
}
let session_token = match serde_json::from_value(cubody[1].clone()) {
Ok(val) => val,
Err(err) => {

View file

@ -505,15 +505,6 @@ impl Credential {
})
}
//TODO: Add validation for securitykey label
#[allow(dead_code)]
pub(crate) fn has_securitykey_by_name(&self, label: &str) -> bool {
match &self.type_ {
CredentialType::PasswordMfa(_, _, wan, _) => wan.contains_key(label),
_ => false,
}
}
#[allow(clippy::ptr_arg)]
/// After a successful authentication with Webauthn, we need to advance the credentials
/// counter value to prevent certain classes of replay attacks.