mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-06-04 06:24:58 -06:00
Fix: reorder imports and clean up whitespace in admin.rs
This commit is contained in:
parent
7e3acf26b4
commit
2be8e7e628
@ -1,8 +1,8 @@
|
|||||||
use data_encoding::BASE64URL_NOPAD;
|
use data_encoding::BASE64URL_NOPAD;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::{env, sync::LazyLock};
|
|
||||||
use std::sync::RwLock;
|
use std::sync::RwLock;
|
||||||
use std::time::{SystemTime, UNIX_EPOCH};
|
use std::time::{SystemTime, UNIX_EPOCH};
|
||||||
|
use std::{env, sync::LazyLock};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use reqwest::Method;
|
use reqwest::Method;
|
||||||
@ -106,8 +106,7 @@ static CAN_BACKUP: LazyLock<bool> =
|
|||||||
static CAN_BACKUP: LazyLock<bool> = LazyLock::new(|| false);
|
static CAN_BACKUP: LazyLock<bool> = LazyLock::new(|| false);
|
||||||
|
|
||||||
// OAuth2 state storage for CSRF protection (state -> expiration timestamp)
|
// OAuth2 state storage for CSRF protection (state -> expiration timestamp)
|
||||||
static OAUTH2_STATES: LazyLock<RwLock<HashMap<String, u64>>> =
|
static OAUTH2_STATES: LazyLock<RwLock<HashMap<String, u64>>> = LazyLock::new(|| RwLock::new(HashMap::new()));
|
||||||
LazyLock::new(|| RwLock::new(HashMap::new()));
|
|
||||||
|
|
||||||
#[get("/")]
|
#[get("/")]
|
||||||
fn admin_disabled() -> &'static str {
|
fn admin_disabled() -> &'static str {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user