mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 13:34:58 -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
|
@ -695,9 +695,7 @@ class OidcHandler:
|
|||
return
|
||||
|
||||
# Pull out the user-agent and IP from the request.
|
||||
user_agent = request.requestHeaders.getRawHeaders(b"User-Agent", default=[b""])[
|
||||
0
|
||||
].decode("ascii", "surrogateescape")
|
||||
user_agent = request.get_user_agent("")
|
||||
ip_address = self.hs.get_ip_from_request(request)
|
||||
|
||||
# Call the mapper to register/login the user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue