diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-05-06 05:05:32 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-06 05:05:32 +0300 |
| commit | 13cf7271d6350a883a124d809b969321934abb7a (patch) | |
| tree | a822f006abd9afcebe82b052feeb5b1bb7fc5032 /main.go | |
| parent | 63edc63ab0c1b2ec679dde0292d5e557da8e350e (diff) | |
fix: check default credentials during a fresh installation
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -16,6 +16,7 @@ import ( "x-ui/web" "x-ui/web/global" "x-ui/web/service" + "x-ui/util/crypto" "github.com/op/go-logging" ) @@ -161,6 +162,12 @@ func showSetting(show bool) { } else { fmt.Println("Panel is secure with SSL") } + + hasDefaultCredential := func() bool { + return userModel.Username == "admin" && crypto.CheckPasswordHash(userModel.Password, "admin") + }() + + fmt.Println("hasDefaultCredential:", hasDefaultCredential) fmt.Println("port:", port) fmt.Println("webBasePath:", webBasePath) } |
