remove trailing newline from pin
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
55bae4161e
commit
0ec859f4a6
@ -25,7 +25,7 @@ fn read_pin(ap: &AuthenticatorParameters) -> Fido2LuksResult<String> {
|
|||||||
if let Some(src) = ap.pin_source.as_ref() {
|
if let Some(src) = ap.pin_source.as_ref() {
|
||||||
let mut pin = String::new();
|
let mut pin = String::new();
|
||||||
File::open(src)?.read_to_string(&mut pin)?;
|
File::open(src)?.read_to_string(&mut pin)?;
|
||||||
Ok(pin)
|
Ok(pin.trim_end_matches("\n").to_string()) //remove trailing newline
|
||||||
} else {
|
} else {
|
||||||
util::read_password("Authenticator PIN", false)
|
util::read_password("Authenticator PIN", false)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user