Skip to content

Commit 2a0d9a0

Browse files
committed
feat: exit if no password
1 parent 5b52f9f commit 2a0d9a0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

modules/login/base.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ func GetToken(password string, key string, ip string, skipCheck bool) (string, s
126126
newEncryptMode, routername, hardware := getrouterinfo(ip)
127127
logrus.Info("Updating token...")
128128
nonce := createNonce()
129+
130+
if password == "" {
131+
logrus.Info("Password is empty, please check configuration")
132+
time.Sleep(5 * time.Second)
133+
os.Exit(1)
134+
}
135+
129136
var hashedPassword string
130137

131138
if newEncryptMode {

0 commit comments

Comments
 (0)