From c0a967d9c9f3bcb674b7fcbbdab6c8879ae9a6b0 Mon Sep 17 00:00:00 2001 From: bai Date: Tue, 28 Jul 2020 05:52:59 -0400 Subject: IP de failed log-ins logeado a archivo ahora. --- cgi/manage.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cgi') 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') -- cgit v1.2.1-18-gbd029