From 28e06d2df65f4d63161e18b26e381fd8022a5f24 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 29 Dec 2022 11:17:52 -0500 Subject: [PATCH 1/2] Actually use the picture_claim as configured in OIDC config. --- synapse/handlers/oidc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/handlers/oidc.py b/synapse/handlers/oidc.py index 03de6a4ba637..23fb00c9c987 100644 --- a/synapse/handlers/oidc.py +++ b/synapse/handlers/oidc.py @@ -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, From 89b98e2a3cfb5d13d5904c3885596d430ef382da Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 29 Dec 2022 11:20:36 -0500 Subject: [PATCH 2/2] Newsfragment --- changelog.d/14751.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/14751.bugfix diff --git a/changelog.d/14751.bugfix b/changelog.d/14751.bugfix new file mode 100644 index 000000000000..56ef8522881a --- /dev/null +++ b/changelog.d/14751.bugfix @@ -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).