diff options
| author | KunoiSayami <[email protected]> | 2021-05-10 16:09:19 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2021-05-10 16:09:19 +0800 |
| commit | 309a78d246ff175eaf12f6a7d4e9d70845b9edda (patch) | |
| tree | 6665551380832e1509f0715dc055d94def90e6a2 /src/datastructures.rs | |
| parent | c5ed7b895caad6dc4e6d3398fbe3c154a102959c (diff) | |
feat: Add reset database subcommandv0.2.1
* fix: Fix CI build failure
Diffstat (limited to 'src/datastructures.rs')
| -rw-r--r-- | src/datastructures.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/datastructures.rs b/src/datastructures.rs index bb91cfb..319446d 100644 --- a/src/datastructures.rs +++ b/src/datastructures.rs @@ -35,9 +35,9 @@ use rand_core::OsRng; const DEFAULT_CONFIG_LOCATION: &str = "/etc/cgitrc"; const DEFAULT_COOKIE_TTL: u64 = 1200; const DEFAULT_DATABASE_LOCATION: &str = "/etc/cgit/auth.db"; -pub const CACHE_DIR: &str = "/var/cache/cgit"; +//pub const CACHE_DIR: &str = "/var/cache/cgit"; pub type RandIntType = u32; -pub const MINIMUM_SECRET_LENGTH: usize = 8; +//pub const MINIMUM_SECRET_LENGTH: usize = 8; pub fn get_current_timestamp() -> u64 { let start = std::time::SystemTime::now(); @@ -100,7 +100,7 @@ impl Config { let mut cookie_ttl: u64 = DEFAULT_COOKIE_TTL; let mut database: &str = "/etc/cgit/auth.db"; let mut bypass_root: bool = false; - let mut secret: &str = ""; + //let mut secret: &str = ""; for line in file.lines() { let line = line.trim(); if !line.contains('=') || !line.starts_with("cgit-simple-auth-") { @@ -117,7 +117,7 @@ impl Config { "cookie-ttl" => cookie_ttl = value.parse().unwrap_or(DEFAULT_COOKIE_TTL), "database" => database = value, "bypass-root" => bypass_root = value.to_lowercase().eq("true"), - "secret" => secret = value, + //"secret" => secret = value, _ => {} } } |
