aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2026-06-11 14:53:23 +0800
committerKunoiSayami <[email protected]>2026-06-11 14:53:23 +0800
commit9e67f120b797bae10bd226bbb4632f8d19a24361 (patch)
treed94a9a067eb05cf78bee7282ff7c9f093c360bfc /src/main.rs
parentc708a63f7e5b9b22f8095ede0be56115eccbbac8 (diff)
fix: Fix OsRng import and refactor Redis connection setup
- Fix password-hash version mismatch (0.6→0.5) causing OsRng to be gated behind missing getrandom feature; enable argon2 rand feature - Extract get_redis_connection() helper to deduplicate Redis client setup across authentication, repo control, and tests - Tighten username validation regex to require ≥2 chars and disallow leading/trailing dots or hyphens - Handle malformed cookies without split_once gracefully (continue instead of panic) - Fix typos: "rated commands" → "related commands" in CLI help text Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 318a94c..3b9e04b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -133,7 +133,7 @@ fn get_arg_matches(arguments: Option<Vec<&str>>) -> ArgMatches {
)
.subcommand(
Command::new("database")
- .about("Database rated commands")
+ .about("Database related commands")
.subcommand(
Command::new("init")
.about("Init sqlite database")
@@ -154,7 +154,7 @@ fn get_arg_matches(arguments: Option<Vec<&str>>) -> ArgMatches {
)
.subcommand(
Command::new("user")
- .about("Users rated commands")
+ .about("User related commands")
.subcommand(
Command::new("add")
.about("Add user to database")
@@ -177,7 +177,7 @@ fn get_arg_matches(arguments: Option<Vec<&str>>) -> ArgMatches {
)
.subcommand(
Command::new("repo")
- .about("Repository ACL rated commands")
+ .about("Repository ACL related commands")
.subcommand(
Command::new("add")
.about("Add user to repository")