aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar bai 2020-07-28 05:52:59 -0400
committerLibravatar bai 2020-07-28 05:52:59 -0400
commitc0a967d9c9f3bcb674b7fcbbdab6c8879ae9a6b0 (patch)
tree6ff4e664246178d886b55d0d87699f2c1a6a297c
parentf71a7d75ddc0725fe15ae78ec44d54f69b32d771 (diff)
downloadweabot-c0a967d9c9f3bcb674b7fcbbdab6c8879ae9a6b0.tar.gz
weabot-c0a967d9c9f3bcb674b7fcbbdab6c8879ae9a6b0.tar.xz
weabot-c0a967d9c9f3bcb674b7fcbbdab6c8879ae9a6b0.zip
IP de failed log-ins logeado a archivo ahora.
-rw-r--r--cgi/manage.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cgi/manage.py b/cgi/manage.py
index 61cf95e..5def5c5 100644
--- a/cgi/manage.py
+++ b/cgi/manage.py
@@ -3,9 +3,8 @@ import _mysql
import os
import cgi
import shutil
-import imaplib
-import poplib
import datetime
+import logging
from database import *
from settings import Settings
@@ -40,8 +39,8 @@ def manage(self, path_split):
str(timestamp() - 604800)) # one week
else:
page += _('Incorrect username/password.')
- logAction('', 'Failed log-in. U:'+_mysql.escape_string(
- self.formdata['username'])+' IP:'+self.environ["REMOTE_ADDR"])
+ logAction('', 'Failed log-in. U:'+_mysql.escape_string(self.formdata['username'])+' IP logged.')
+ logging.warn("Failed log-in. U:{} IP:{}".format(self.formdata['username'], self.environ["REMOTE_ADDR"]))
else:
# Validate existing session
manage_cookie = getCookie(self, 'weabot_manage')