Skip to content

Commit 749a426

Browse files
authored
show IP on warning log when user pass is not correct (#2607)
1 parent b859327 commit 749a426

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/controller/index.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (a *IndexController) login(c *gin.Context) {
6969
safePass := template.HTMLEscapeString(form.Password)
7070
safeSecret := template.HTMLEscapeString(form.LoginSecret)
7171
if user == nil {
72-
logger.Warningf("wrong username or password or secret: \"%s\" \"%s\" \"%s\"", safeUser, safePass, safeSecret)
72+
logger.Warningf("wrong username: \"%s\", password: \"%s\", secret: \"%s\", IP: \"%s\"", safeUser, safePass, safeSecret, getRemoteIp(c))
7373
a.tgbot.UserLoginNotify(safeUser, safePass, getRemoteIp(c), timeStr, 0)
7474
pureJsonMsg(c, http.StatusOK, false, I18nWeb(c, "pages.login.toasts.wrongUsernameOrPassword"))
7575
return

0 commit comments

Comments
 (0)