Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Actually use the picture_claim as configured in OIDC config. (#14751)
Browse files Browse the repository at this point in the history
Previously it was only using the default value ("picture") when
fetching the picture from the user info.
  • Loading branch information
clokep authored Dec 29, 2022
1 parent eb9ae47 commit 044fa1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/14751.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in Synapse 1.73.0 where the `picture_claim` configured under `oidc_providers` was unused (the default value of `"picture"` was used instead).
2 changes: 1 addition & 1 deletion synapse/handlers/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ def render_template_field(template: Optional[Template]) -> Optional[str]:
if email:
emails.append(email)

picture = userinfo.get("picture")
picture = userinfo.get(self._config.picture_claim)

return UserAttributeDict(
localpart=localpart,
Expand Down

0 comments on commit 044fa1a

Please sign in to comment.