mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:56:04 -04:00
Fix handling of User-Agent headers with bad utf-8. (#8632)
This commit is contained in:
parent
db9ef792f0
commit
c850dd9a8e
8 changed files with 33 additions and 28 deletions
|
@ -184,9 +184,7 @@ class Auth:
|
|||
"""
|
||||
try:
|
||||
ip_addr = self.hs.get_ip_from_request(request)
|
||||
user_agent = request.requestHeaders.getRawHeaders(
|
||||
b"User-Agent", default=[b""]
|
||||
)[0].decode("ascii", "surrogateescape")
|
||||
user_agent = request.get_user_agent("")
|
||||
|
||||
access_token = self.get_access_token_from_request(request)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue