Actually use the picture_claim as configured in OIDC config. (#14751)

Previously it was only using the default value ("picture") when
fetching the picture from the user info.
This commit is contained in:
Patrick Cloke 2022-12-29 12:18:06 -05:00 committed by GitHub
parent eb9ae47799
commit 044fa1a1de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/14751.bugfix Normal file
View File

@ -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).

View File

@ -1615,7 +1615,7 @@ class JinjaOidcMappingProvider(OidcMappingProvider[JinjaOidcMappingConfig]):
if email:
emails.append(email)
picture = userinfo.get("picture")
picture = userinfo.get(self._config.picture_claim)
return UserAttributeDict(
localpart=localpart,