diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-01-16 02:41:20 -0600 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-01-16 02:41:20 -0600 |
commit | f6039315ea920631b117747ca857231e03ec66b9 (patch) | |
tree | 60816ca1c41f58fefa312d69f467456607251023 /src | |
parent | 387087b3b2359ad7f434a16f5682ef781539e786 (diff) |
Lower-case the X.500s.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/add-student-x500s.rs | 2 | ||||
-rw-r--r-- | src/handlers/x500_mapper.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/add-student-x500s.rs b/src/bin/add-student-x500s.rs index 14023b1..d39568c 100644 --- a/src/bin/add-student-x500s.rs +++ b/src/bin/add-student-x500s.rs @@ -99,7 +99,7 @@ async fn main() -> Result<()> { .map(|record| { let email = &record[3]; if let Some(x500) = email.strip_suffix("@umn.edu") { - Ok(x500.to_string()) + Ok(x500.to_lowercase()) } else { bail!("not a valid UMN email: {:?}", email) } diff --git a/src/handlers/x500_mapper.rs b/src/handlers/x500_mapper.rs index 31b888f..c228f70 100644 --- a/src/handlers/x500_mapper.rs +++ b/src/handlers/x500_mapper.rs @@ -79,6 +79,7 @@ impl X500Mapper { } async fn record_x500(&self, uid: UserId, x500: String) { + let x500 = x500.to_lowercase(); let x500 = &x500; let future = async move { let uid = i64::from(uid); |