diff --git a/src/cli.rs b/src/cli.rs index e1e06d2..629b5b9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -25,7 +25,7 @@ fn read_pin(ap: &AuthenticatorParameters) -> Fido2LuksResult { if let Some(src) = ap.pin_source.as_ref() { let mut pin = String::new(); File::open(src)?.read_to_string(&mut pin)?; - Ok(pin) + Ok(pin.trim_end_matches("\n").to_string()) //remove trailing newline } else { util::read_password("Authenticator PIN", false) }