Skip to content

Commit

Permalink
chore: check if SESSION_SECRET equals to random_string
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Dec 20, 2023
1 parent 67c64e7 commit b7fcb31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ func init() {
}

if os.Getenv("SESSION_SECRET") != "" {
SessionSecret = os.Getenv("SESSION_SECRET")
if os.Getenv("SESSION_SECRET") == "random_string" {
SysError("SESSION_SECRET is set to an example value, please change it to a random string.")
} else {
SessionSecret = os.Getenv("SESSION_SECRET")
}
}
if os.Getenv("SQLITE_PATH") != "" {
SQLitePath = os.Getenv("SQLITE_PATH")
Expand Down

0 comments on commit b7fcb31

Please sign in to comment.