diff --git a/src/Cargo.lock b/src/Cargo.lock index e8fa977..cbde2fb 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -1145,7 +1145,7 @@ dependencies = [ [[package]] name = "orangutan-server" -version = "0.4.11" +version = "0.4.12" dependencies = [ "base64 0.22.1", "biscuit-auth", diff --git a/src/orangutan-server/Cargo.toml b/src/orangutan-server/Cargo.toml index 9a8a0e0..a4c3302 100644 --- a/src/orangutan-server/Cargo.toml +++ b/src/orangutan-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "orangutan-server" -version = "0.4.11" +version = "0.4.12" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/orangutan-server/src/main.rs b/src/orangutan-server/src/main.rs index 5424502..c3fac22 100644 --- a/src/orangutan-server/src/main.rs +++ b/src/orangutan-server/src/main.rs @@ -17,6 +17,7 @@ use rocket::{ response::{self, Responder}, Request, }; +use routes::auth_routes::REVOKED_TOKENS; #[cfg(feature = "templating")] use tracing::debug; use tracing::warn; @@ -74,6 +75,8 @@ fn rocket() -> _ { fn liftoff() -> Result<(), Error> { create_tmp_dir()?; clone_repository()?; + // NOTE: This is just a hotfix. I had to quickly revoke a token. I'll improve this one day. + *REVOKED_TOKENS.write().unwrap() = read_revoked_tokens()?; generate_default_website()?; Ok(()) } diff --git a/src/orangutan-server/src/routes/auth_routes.rs b/src/orangutan-server/src/routes/auth_routes.rs index 248582d..88cea69 100644 --- a/src/orangutan-server/src/routes/auth_routes.rs +++ b/src/orangutan-server/src/routes/auth_routes.rs @@ -18,7 +18,7 @@ use crate::{ }; lazy_static! { - pub(super) static ref REVOKED_TOKENS: RwLock>> = RwLock::default(); + pub static ref REVOKED_TOKENS: RwLock>> = RwLock::default(); } pub(super) fn routes() -> Vec {