1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-04 10:19:27 +02:00

Update hmac, pbkdf2, serde, serde_json, sha-1

This commit is contained in:
Roderick van Domburg 2022-01-09 00:25:47 +01:00
parent 42455e0cdd
commit 56f3c39fc6
No known key found for this signature in database
GPG key ID: FE2585E713F9F30A
8 changed files with 78 additions and 42 deletions

View file

@ -15,7 +15,7 @@ use aes::{
};
use futures_core::Stream;
use futures_util::{FutureExt, TryFutureExt};
use hmac::{Hmac, Mac, NewMac};
use hmac::{Hmac, Mac};
use hyper::{
service::{make_service_fn, service_fn},
Body, Method, Request, Response, StatusCode,
@ -137,7 +137,7 @@ impl RequestHandler {
let mut h = Hmac::<Sha1>::new_from_slice(&checksum_key)
.map_err(|_| DiscoveryError::HmacError(base_key.to_vec()))?;
h.update(encrypted);
if h.verify(cksum).is_err() {
if h.verify_slice(cksum).is_err() {
warn!("Login error for user {:?}: MAC mismatch", username);
let result = json!({
"status": 102,