Changeset

5360:f05de5ac219f

mod_oidc_userinfo_vcard4: Unpack <vcard> from PubSub <item> Forgot about the <item>, so it was previously attempting to extract all properties from that instead of the inner <vcard>
author Kim Alvefur <zash@zash.se>
date Sun, 23 Apr 2023 13:37:58 +0200 (20 months ago)
parents 5359:230fc6a0c086
children 5361:cec1b0b0adef
files mod_oidc_userinfo_vcard4/mod_oidc_userinfo_vcard4.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_oidc_userinfo_vcard4/mod_oidc_userinfo_vcard4.lua	Sat Apr 22 16:29:56 2023 +0200
+++ b/mod_oidc_userinfo_vcard4/mod_oidc_userinfo_vcard4.lua	Sun Apr 23 13:37:58 2023 +0200
@@ -13,6 +13,7 @@
 	local vcard4 = select(3, pep_service:get_last_item("urn:xmpp:vcard4", true));
 
 	local userinfo = event.userinfo;
+	vcard4 = vcard4 and vcard4:get_child("vcard", "urn:ietf:params:xml:ns:vcard-4.0");
 	if vcard4 and event.claims:contains("profile") then
 		userinfo.name = vcard4:find("fn/text#");
 		userinfo.family_name = vcard4:find("n/surname#");