mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
django: Use HttpRequest.headers.
Fixes #14769. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Alex Vandiver
parent
d98e3ecb0d
commit
0043c0b6b2
@@ -74,7 +74,7 @@ def email_on_new_login(sender: Any, user: UserProfile, request: Any, **kwargs: A
|
||||
if (timezone_now() - user.date_joined).total_seconds() <= JUST_CREATED_THRESHOLD:
|
||||
return
|
||||
|
||||
user_agent = request.META.get("HTTP_USER_AGENT", "").lower()
|
||||
user_agent = request.headers.get("User-Agent", "").lower()
|
||||
|
||||
context = common_context(user)
|
||||
context["user_email"] = user.delivery_email
|
||||
|
||||
Reference in New Issue
Block a user