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

@ -1,10 +1,12 @@
use std::ops::Deref;
use crate::constants::MAX_SECOND_FACTOR_NAME_LEN;
use actix_web::{HttpResponse, Responder};
use askama::Template;
use base64::engine::general_purpose::STANDARD as BASE64_STANDARD;
use base64::Engine as _;
use qrcode_generator::QrCodeEcc;
use crate::constants::MAX_SECOND_FACTOR_NAME_LEN;
use crate::controllers::settings_controller::BaseSettingsPage;
use crate::data::app_config::AppConfig;
use crate::data::current_user::CurrentUser;
@ -70,7 +72,7 @@ pub async fn add_totp_factor_route(user: CurrentUser) -> impl Responder {
HttpResponse::Ok().body(
AddTotpPage {
_p: BaseSettingsPage::get("New authenticator app", &user, None, None),
qr_code: base64::encode(qr_code),
qr_code: BASE64_STANDARD.encode(qr_code),
account_name: key.account_name(&user, AppConfig::get()),
secret_key: key.get_secret(),
max_name_len: MAX_SECOND_FACTOR_NAME_LEN,