remove trailing newline from pin
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
shimun 2020-09-25 12:40:34 +02:00
parent 55bae4161e
commit 0ec859f4a6
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -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)
} }