From 423bc3d42d96f1f6e2a7f43f64a53beabe4fe72c Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sun, 1 Dec 2024 17:51:14 +0100 Subject: [PATCH] XEP-0480: Make CDATA mandatory for all elements The CDATA of XEP-0480's , , and elements is mandatory. --- specs/xmpp_codec.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specs/xmpp_codec.spec b/specs/xmpp_codec.spec index a6b13a2..b4bc34f 100644 --- a/specs/xmpp_codec.spec +++ b/specs/xmpp_codec.spec @@ -5552,7 +5552,9 @@ -xml(sasl_upgrade, #elem{name = <<"upgrade">>, xmlns = <<"urn:xmpp:sasl:upgrade:0">>, - module = 'xep0480', + module = 'xep0480', + cdata = #cdata{label = '$cdata', + required = true}, result = {sasl_upgrade, '$cdata'}}). -xml(scram_upgrade_salt, @@ -5560,11 +5562,12 @@ xmlns = <<"urn:xmpp:scram-upgrade:0">>, module = 'xep0480', attrs = [#attr{name = <<"iterations">>, - label = '$iterations', + label = '$iterations', enc = {enc_int, []}, dec = {dec_int, [1, infinity]}, required = true}], cdata = #cdata{label = '$cdata', + required = true, enc = {base64, encode, []}, dec = {base64, decode, []}}, result = {scram_upgrade_salt, '$iterations', '$cdata'}}). @@ -5574,6 +5577,7 @@ xmlns = <<"urn:xmpp:scram-upgrade:0">>, module = 'xep0480', cdata = #cdata{label = '$data', + required = true, enc = {base64, encode, []}, dec = {base64, decode, []}}, result = {scram_upgrade_hash, '$data'}}).