trim newlines in ssh key

This commit is contained in:
snow flurry 2024-08-14 22:09:31 -07:00
parent f5bf777b2e
commit 8e9478ebc6

View file

@ -175,7 +175,7 @@ impl std::str::FromStr for SshPubkey {
if !BASE64_RE.is_match(key_data) {
return Err(SshPubkeyParseError::InvalidKeyData);
}
let comment = pieces.next().map(|s| s.to_owned());
let comment = pieces.next().map(|s| s.trim().to_owned());
Ok(Self {
id: None,