Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlexnake3 <lexnake3307@gmail.com>2024-12-04 00:41:14 +0300
committerGitHub <noreply@github.com>2024-12-04 00:41:14 +0300
commit749a426a712548fbe0523be1d377a407a46e991e (patch)
tree87b6dd2e105e2a777b120d524afc2b77859eb2c9 /web/controller/index.go
parentb859327b8ad84dd2b44b9bd3a336a63646833701 (diff)
show IP on warning log when user pass is not correct (#2607)
Diffstat (limited to 'web/controller/index.go')
-rw-r--r--web/controller/index.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/controller/index.go b/web/controller/index.go
index 2547570c..c74b6fb1 100644
--- a/web/controller/index.go
+++ b/web/controller/index.go
@@ -69,7 +69,7 @@ func (a *IndexController) login(c *gin.Context) {
safePass := template.HTMLEscapeString(form.Password)
safeSecret := template.HTMLEscapeString(form.LoginSecret)
if user == nil {
- logger.Warningf("wrong username or password or secret: \"%s\" \"%s\" \"%s\"", safeUser, safePass, safeSecret)
+ logger.Warningf("wrong username: \"%s\", password: \"%s\", secret: \"%s\", IP: \"%s\"", safeUser, safePass, safeSecret, getRemoteIp(c))
a.tgbot.UserLoginNotify(safeUser, safePass, getRemoteIp(c), timeStr, 0)
pureJsonMsg(c, http.StatusOK, false, I18nWeb(c, "pages.login.toasts.wrongUsernameOrPassword"))
return