From 29680c6a0ac46684ad6c6712896649f6acff737f Mon Sep 17 00:00:00 2001 From: KunoiSayami <46131041+KunoiSayami@users.noreply.github.com> Date: Tue, 13 Jul 2021 00:13:44 +0800 Subject: feat(core): Rewritten configure file parser * feat(core): Support full protect mode * feat(test): Reduced sleeping time and support new parser * feat(crate): Bump version --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index be653fc..00b52a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -109,6 +109,7 @@ async fn cmd_authenticate_cookie(matches: &ArgMatches<'_>, cfg: Config) -> Resul let mut bypass = false; + // TODO: bypass root not working properly if we select sort mode if cfg.bypass_root && current_url.eq("/") && repo.is_empty() { bypass = true; } @@ -147,7 +148,8 @@ async fn cmd_authenticate_cookie(matches: &ArgMatches<'_>, cfg: Config) -> Resul .get::<_, String>(format!("cgit_auth_{}", cookie.get_key())) .await { - log::debug!("Cookie is valid"); + // TODO: Extend cookie ttl in each authenticate request + //log::debug!("Cookie is valid"); if cookie.eq_body(r.as_str()) { if repo.is_empty() { return Ok(true); -- cgit v1.3.1