Update crate base64
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-23 16:38:21 +01:00
parent 222c950505
commit e35f890241
7 changed files with 23 additions and 13 deletions

View File

@ -4,6 +4,8 @@ use actix::Addr;
use actix_identity::Identity;
use actix_web::error::ErrorUnauthorized;
use actix_web::{web, HttpRequest, HttpResponse, Responder};
use base64::engine::general_purpose::STANDARD as BASE64_STANDARD;
use base64::Engine as _;
use crate::actors::openid_sessions_actor::{OpenIDSessionsActor, Session, SessionID};
use crate::actors::users_actor::UsersActor;
@ -295,7 +297,7 @@ pub async fn token(
Some(v) => v,
};
let decode = String::from_utf8_lossy(&match base64::decode(token) {
let decode = String::from_utf8_lossy(&match BASE64_STANDARD.decode(token) {
Ok(d) => d,
Err(e) => {
log::error!("Failed to decode authorization header: {:?}", e);
@ -601,7 +603,7 @@ async fn user_info(
return user_info_error(
"invalid_request",
"Header token does not start with 'Bearer '!",
)
);
}
Some(t) => t,
};