Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OIDC login regression #17031

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/17031.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OIDC: try to JWT decode userinfo response if JSON parsing failed.
7 changes: 7 additions & 0 deletions synapse/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means we can remove all the User-Agent set in the other class methods, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, just want to keep this PR as small as possible to land in the RC


request_deferred: defer.Deferred = treq.request(
method,
uri,
Expand Down
Loading