diff --git a/changelog.d/17031.feature b/changelog.d/17031.feature new file mode 100644 index 00000000000..0f28cbbcd6e --- /dev/null +++ b/changelog.d/17031.feature @@ -0,0 +1 @@ +OIDC: try to JWT decode userinfo response if JSON parsing failed. diff --git a/synapse/http/client.py b/synapse/http/client.py index 08a8634dae6..4718517c979 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -390,6 +390,13 @@ async def request( 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,