mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Chore: upgrade python-ipware dependency (#4446)
This commit is contained in:
parent
38e035b95c
commit
0f1dea67b7
7
Pipfile.lock
generated
7
Pipfile.lock
generated
@ -1293,12 +1293,11 @@
|
||||
},
|
||||
"python-ipware": {
|
||||
"hashes": [
|
||||
"sha256:01b9fa589521c29d7573f69fc4855c6b95687f0029601b78fffef1eb17f1de27",
|
||||
"sha256:ee84cd16c2cf862faae197ad5f8fae6c75e4b1f40bb13357944a5d63ddc2a373"
|
||||
"sha256:802858aa13308d572876d1883edae0eae380fe70a51fdefcb46c8a2099240862",
|
||||
"sha256:a52757123c718342f74b16ab2d9d4a531888d69d10b8197c073164635df0a13b"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==0.9.0"
|
||||
"version": "==2.0.0"
|
||||
},
|
||||
"python-magic": {
|
||||
"hashes": [
|
||||
|
@ -1,14 +1,14 @@
|
||||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
from ipware import IpWare
|
||||
from python_ipware import IpWare
|
||||
|
||||
logger = logging.getLogger("paperless.auth")
|
||||
|
||||
|
||||
# https://docs.djangoproject.com/en/4.1/ref/contrib/auth/#django.contrib.auth.signals.user_login_failed
|
||||
def handle_failed_login(sender, credentials, request, **kwargs):
|
||||
ipware = IpWare(proxy_trusted_list=settings.TRUSTED_PROXIES)
|
||||
ipware = IpWare(proxy_list=settings.TRUSTED_PROXIES)
|
||||
client_ip, _ = ipware.get_client_ip(
|
||||
meta=request.META,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user