mirror of
https://github.com/jazzband/django-defender.git
synced 2026-03-16 22:10:32 +00:00
commit
57a069bc61
1 changed files with 5 additions and 1 deletions
|
|
@ -314,9 +314,13 @@ def add_login_attempt_to_db(request, login_valid):
|
|||
# If we don't want to store in the database, then don't proceed.
|
||||
return
|
||||
|
||||
if config.USERNAME_FORM_FIELD in request.POST:
|
||||
username = request.POST[config.USERNAME_FORM_FIELD][:255]
|
||||
else:
|
||||
username = None
|
||||
|
||||
user_agent = request.META.get('HTTP_USER_AGENT', '<unknown>')[:255]
|
||||
ip_address = get_ip(request)
|
||||
username = request.POST.get(config.USERNAME_FORM_FIELD, None)
|
||||
http_accept = request.META.get('HTTP_ACCEPT', '<unknown>')
|
||||
path_info = request.META.get('PATH_INFO', '<unknown>')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue