# HG changeset patch # User Mikael Berthe # Date 1164560731 -3600 # Node ID 96be69d3a5fd7fb5c0fd3cf3280cc570c849e3f6 # Parent 52cfe9bf98407986baa7887e645ccfa2946dfa41 Verify signatures for empty status messages The element is mandatory when signing (according to XEP-0027), but some Jabber clients omit it. diff -r 52cfe9bf9840 -r 96be69d3a5fd mcabber/src/jabglue.c --- a/mcabber/src/jabglue.c Sun Nov 26 17:12:34 2006 +0100 +++ b/mcabber/src/jabglue.c Sun Nov 26 18:05:31 2006 +0100 @@ -1440,7 +1440,7 @@ gpgme_sigsum_t sigsum; // All parameters must be valid - if (!(xmldata && barejid && rname && text && *text)) + if (!(xmldata && barejid && rname && text)) return; if (!gpg_enabled()) @@ -2050,6 +2050,8 @@ (!ustmsg && m && m[0]) || (ustmsg && (!m || strcmp(ustmsg, m)))) hk_statuschange(r, rname, bpprio, timestamp, ust, ustmsg); // Presence signature processing + if (!ustmsg) + ustmsg = ""; // Some clients omit the element :-( check_signature(r, rname, xml_get_xmlns(xmldata, NS_SIGNED), ustmsg); }