mirror of
https://github.com/Mailu/Mailu.git
synced 2024-12-14 10:53:30 +02:00
Ensure we have the right IP
This commit is contained in:
parent
c5bd82650f
commit
94bbed9746
@ -86,7 +86,7 @@ def basic_authentication():
|
||||
response.headers['Retry-After'] = '60'
|
||||
return response
|
||||
user = models.User.query.get(user_email)
|
||||
if user and nginx.check_credentials(user, password.decode('utf-8'), flask.request.remote_addr, "web"):
|
||||
if user and nginx.check_credentials(user, password.decode('utf-8'), client_ip, "web"):
|
||||
response = flask.Response()
|
||||
response.headers["X-User"] = models.IdnaEmail.process_bind_param(flask_login, user.email, "")
|
||||
utils.limiter.exempt_ip_from_ratelimits(client_ip)
|
||||
|
Loading…
Reference in New Issue
Block a user