mirror of
https://github.com/kanidm/kanidm.git
synced 2025-05-20 16:03:55 +02:00
Addressed review comments
This commit is contained in:
parent
54e22cd917
commit
d19f49af3f
|
@ -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) => {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue