# HG changeset patch # User souliane # Date 1448468365 -3600 # Node ID 9ff4f60de0053af8081aabf56bb67c5694388d71 # Parent c2d96f74105ec70ccf5cd6c5c68c0c3e9acda59c plugin XEP-0277: use bare JIDs to verify publisher diff -r c2d96f74105e -r 9ff4f60de005 src/plugins/plugin_xep_0277.py --- a/src/plugins/plugin_xep_0277.py Wed Nov 25 16:59:13 2015 +0100 +++ b/src/plugins/plugin_xep_0277.py Wed Nov 25 17:19:25 2015 +0100 @@ -302,10 +302,10 @@ if not publisher: log.debug("No publisher attribute, we can't verify author jid") microblog_data['author_jid_verified'] = C.BOOL_FALSE - elif publisher == uri: + elif publisher.split("/")[0] == uri.split("/")[0]: microblog_data['author_jid_verified'] = C.BOOL_TRUE else: - log.warning("item atom:uri differ from publisher attribute, spoofing attempt ? atom:uri = {} publisher = {}".format(uri, item_elt.getAttribute("publisher"))) + log.warning("item atom:uri differs from publisher attribute: spoofing attempt? atom:uri = {} publisher = {}".format(uri, item_elt.getAttribute("publisher"))) microblog_data['author_jid_verified'] = C.BOOL_FALSE # email try: