Password files must be trimmed of newlines

This commit is contained in:
D. Scott Boggs 2025-05-08 08:49:02 -04:00
parent a834207fee
commit 4b7ec853b1
2 changed files with 8 additions and 5 deletions

View file

@ -35,7 +35,7 @@ pub async fn cleanup<A: Adaptor>(
println!("Error reading CRON_KEY_FILE at {path:?}");
return Err(ApiError::NotAuthorized);
};
String::from_utf8_lossy(key.as_slice()).into()
String::from_utf8_lossy(key.as_slice()).to_owned().trim_end().to_string()
} else {
Default::default()
};