Update missing inputmode numeric when adding a new TOTP. (#3160)

This commit is contained in:
George Wu 2024-10-29 05:57:24 -07:00 committed by GitHub
parent ce31abeeb0
commit fbb3b6b2db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 24 additions and 23 deletions

View file

@ -35,7 +35,8 @@
name="checkTOTPCode"
id="new-totp-check"
value="(( totp_value ))"
type="number"
type="text"
inputmode="numeric"
required
/>

View file

@ -388,7 +388,7 @@ mod tests {
assert!(cr.is_ok());
}
// Tests it is not possible to create an applicatin without the linked group attribute
// Tests it is not possible to create an application without the linked group attribute
#[idm_test]
async fn test_idm_application_no_linked_group(
idms: &IdmServer,
@ -418,7 +418,7 @@ mod tests {
assert!(cr.is_err());
}
// Tests creating an applicatin with a real linked group attribute
// Tests creating an application with a real linked group attribute
#[idm_test]
async fn test_idm_application_linked_group(
idms: &IdmServer,

View file

@ -2460,17 +2460,17 @@ impl<'a> IdmServerCredUpdateTransaction<'a> {
// Check the label.
if !LABEL_RE.is_match(&label) {
error!("SSH Pubilc Key label invalid");
error!("SSH Public Key label invalid");
return Err(OperationError::InvalidLabel);
}
if session.sshkeys.contains_key(&label) {
error!("SSH Pubilc Key label duplicate");
error!("SSH Public Key label duplicate");
return Err(OperationError::DuplicateLabel);
}
if session.sshkeys.values().any(|sk| *sk == sshpubkey) {
error!("SSH Pubilc Key duplicate");
error!("SSH Public Key duplicate");
return Err(OperationError::DuplicateKey);
}
@ -2692,7 +2692,7 @@ mod tests {
) -> (CredentialUpdateSessionToken, CredentialUpdateSessionStatus) {
let mut idms_prox_write = idms.proxy_write(ct).await.unwrap();
// Remove the default all persons policy, it interfers with our test.
// Remove the default all persons policy, it interferes with our test.
let modlist = ModifyList::new_purge(Attribute::CredentialTypeMinimum);
idms_prox_write
.qs_write
@ -3067,7 +3067,7 @@ mod tests {
let cutxn = idms.cred_update_transaction().await.unwrap();
// Now fake going back in time .... allows the tokne to decrypt, but the session
// Now fake going back in time .... allows the token to decrypt, but the session
// is gone anyway!
let c_status = cutxn
.credential_update_status(&cust, ct)

View file

@ -6363,7 +6363,7 @@ mod tests {
btreeset!["value_b".to_string()],
),
),
// Map with a different seperator
// Map with a different separator
Modify::Present(
Attribute::OAuth2RsClaimMap,
Value::OauthClaimMap(

View file

@ -2335,7 +2335,7 @@ mod tests {
// Check the uat.
}
_ => {
error!("A critical error has occurred! We have a non-succcess result!");
error!("A critical error has occurred! We have a non-success result!");
panic!();
}
}
@ -2469,7 +2469,7 @@ mod tests {
token
}
_ => {
error!("A critical error has occurred! We have a non-succcess result!");
error!("A critical error has occurred! We have a non-success result!");
panic!();
}
}
@ -2540,7 +2540,7 @@ mod tests {
// Check the uat.
}
_ => {
error!("A critical error has occurred! We have a non-succcess result!");
error!("A critical error has occurred! We have a non-success result!");
panic!();
}
}
@ -3311,7 +3311,7 @@ mod tests {
// Check the uat.
}
_ => {
error!("A critical error has occurred! We have a non-succcess result!");
error!("A critical error has occurred! We have a non-success result!");
panic!();
}
}
@ -3843,7 +3843,7 @@ mod tests {
match state {
AuthState::Success(uat, AuthIssueSession::Token) => uat,
_ => {
error!("A critical error has occurred! We have a non-succcess result!");
error!("A critical error has occurred! We have a non-success result!");
panic!();
}
}

View file

@ -140,7 +140,7 @@ fn enforce_unique<VALID, STATE>(
// We can probably bisect over the filter to work this out?
if conflict_cand {
// Some kind of confilct exists. We need to isolate which parts of the filter were suspect.
// Some kind of conflict exists. We need to isolate which parts of the filter were suspect.
// To do this, we bisect over the filter and it's suspect elements.
//
// In most cases there is likely only 1 suspect element. But in some there are more. To make

View file

@ -56,7 +56,7 @@ const GID_NSPAWN_MAX: u32 = 1879048191;
const GID_UNUSED_D_MIN: u32 = 0x7000_0000;
pub const GID_UNUSED_D_MAX: u32 = 0x7fff_ffff;
/// Anything above 2147483648 can confuse the kernel (so basicly half the address space
/// Anything above 2147483648 can confuse the kernel (so basically half the address space
/// can't be accessed.
// const GID_UNSAFE_MAX: u32 = 2147483648;
@ -109,7 +109,7 @@ fn apply_gidnumber<T: Clone>(
|| (GID_UNUSED_B_MIN..= GID_UNUSED_B_MAX).contains(&gid)
|| (GID_UNUSED_C_MIN..=GID_UNUSED_C_MAX).contains(&gid)
// We won't ever generate an id in the nspawn range, but we do secretly allow
// it to be set for compatability with services like freeipa or openldap. TBH
// it to be set for compatibility with services like freeipa or openldap. TBH
// most people don't even use systemd nspawn anyway ...
//
// I made this design choice to avoid a tunable that may confuse people to

View file

@ -216,7 +216,7 @@ fn do_leaf_memberof(
tgte.set_ava_set(&Attribute::MemberOf, mo);
}
// If the group has memberOf attributes, we propogate these to
// If the group has memberOf attributes, we propagate these to
// our entry now.
if let Some(group_mo) = memberof_ref {
// IMPORTANT this can't be a NONE because we just create MO in
@ -359,7 +359,7 @@ fn apply_memberof(
);
// Since our groups memberof (and related, direct member of) has changed, we
// need to propogate these values forward into our members. At this point we
// need to propagate these values forward into our members. At this point we
// mark all our members as being part of the affected set.
let pre_member = pre.get_ava_refer(Attribute::Member);
let post_member = tgte.get_ava_refer(Attribute::Member);

View file

@ -1964,7 +1964,7 @@ async fn test_repl_increment_consumer_ruv_trim_past_valid(
drop(server_b_txn);
}
// Test two synchronised nodes where changes are not occuring - this situation would previously
// Test two synchronised nodes where changes are not occurring - this situation would previously
// cause issues because when a change did occur, the ruv would "jump" ahead and cause desyncs.w
#[qs_pair_test]
async fn test_repl_increment_consumer_ruv_trim_idle_servers(
@ -3438,7 +3438,7 @@ async fn test_repl_increment_session_new(server_a: &QueryServer, server_b: &Quer
/// ensures that any RUV state to a server is now fresh and unique
///
/// Second, to prevent tainting the RUV with outdated information, we need to stop it
/// propogating when consumed. At the end of each consumption, the RUV should be trimmed
/// propagating when consumed. At the end of each consumption, the RUV should be trimmed
/// if and only if entries exist in it that exceed the CL max. It is only trimmed conditionally
/// to prevent infinite replication loops since a trim implies the creation of a new anchor.

View file

@ -2700,7 +2700,7 @@ mod tests {
async fn test_scim_entry_structure(server: &QueryServer) {
let mut read_txn = server.read().await.unwrap();
// Query entry (A buitin one ?)
// Query entry (A builtin one ?)
let entry = read_txn
.internal_search_uuid(UUID_IDM_PEOPLE_SELF_NAME_WRITE)
.unwrap();

View file

@ -256,7 +256,7 @@ mod tests {
use kanidm_lib_crypto::CryptoPolicy;
// Test the remove operation, removing all application passwords for an
// applicaiton should also remove the KV pair.
// application should also remove the KV pair.
#[test]
fn test_valueset_application_password_remove() {
let app1_uuid = Uuid::new_v4();