mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-06 05:45:01 +00:00
Implemented multiple U2f keys, key names, and compromised checks
This commit is contained in:
+128
-80
File diff suppressed because it is too large
Load Diff
+6
-3
@@ -47,10 +47,13 @@ impl NumberOrString {
|
||||
}
|
||||
}
|
||||
|
||||
fn into_i32(self) -> Option<i32> {
|
||||
fn into_i32(self) -> ApiResult<i32> {
|
||||
use std::num::ParseIntError as PIE;
|
||||
match self {
|
||||
NumberOrString::Number(n) => Some(n),
|
||||
NumberOrString::String(s) => s.parse().ok(),
|
||||
NumberOrString::Number(n) => Ok(n),
|
||||
NumberOrString::String(s) => s
|
||||
.parse()
|
||||
.map_err(|e: PIE| crate::Error::new("Can't convert to number", e.to_string())),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ mod mail;
|
||||
mod util;
|
||||
|
||||
pub use config::CONFIG;
|
||||
pub use error::{Error, MapResult};
|
||||
|
||||
fn launch_rocket() {
|
||||
// Create Rocket object, this stores current log level and sets it's own
|
||||
|
||||
Reference in New Issue
Block a user