couple things
This commit is contained in:
parent
68c256488d
commit
2a87d6d9dc
1 changed files with 3 additions and 1 deletions
|
@ -19,7 +19,8 @@ pub enum Error {
|
|||
|
||||
impl From<reqwest::Error> for Error {
|
||||
fn from(err: reqwest::Error) -> Self {
|
||||
Self::ReqwestError(err)
|
||||
// don't print secret salt/token combo
|
||||
Self::ReqwestError(err.without_url())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +42,7 @@ impl Client {
|
|||
pub fn with_password(url: &str, username: &str, password: &[u8]) -> Result<Self, Error> {
|
||||
const SALT_BYTES: usize = 8;
|
||||
|
||||
// subsonic docs say to generate a salt per request, but that's completely unnecessary
|
||||
let mut salt = vec![0u8; SALT_BYTES];
|
||||
openssl::rand::rand_bytes(&mut salt).expect("could not generate random salt");
|
||||
let salt_hex = to_hex_str(&salt);
|
||||
|
|
Loading…
Reference in a new issue