mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Fix OIDC login regression (#17031)
Requests may require a User-Agent header, and the change in #16972 accidentally removed it, resulting in requests getting rejected causing login to fail.
This commit is contained in:
parent
b5322b4daf
commit
c900d18647
1
changelog.d/17031.feature
Normal file
1
changelog.d/17031.feature
Normal file
@ -0,0 +1 @@
|
||||
OIDC: try to JWT decode userinfo response if JSON parsing failed.
|
@ -390,6 +390,13 @@ class BaseHttpClient:
|
||||
cooperator=self._cooperator,
|
||||
)
|
||||
|
||||
# Always make sure we add a user agent to the request
|
||||
if headers is None:
|
||||
headers = Headers()
|
||||
|
||||
if not headers.hasHeader("User-Agent"):
|
||||
headers.addRawHeader("User-Agent", self.user_agent)
|
||||
|
||||
request_deferred: defer.Deferred = treq.request(
|
||||
method,
|
||||
uri,
|
||||
|
Loading…
Reference in New Issue
Block a user