From 678e3807e9424259ccdad1288419a122043ccdb9 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 1 Oct 2009 19:13:52 +0200 Subject: [PATCH] [Mattj & Florob] fix canonicalize function to prevent having twice xmlns in the attributes. Fixes #4396 --- src/common/xmpp/c14n.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/xmpp/c14n.py b/src/common/xmpp/c14n.py index 333cf7c55..b21129a22 100644 --- a/src/common/xmpp/c14n.py +++ b/src/common/xmpp/c14n.py @@ -29,6 +29,8 @@ def c14n(node): sorted_attrs = sorted(node.attrs.keys()) for key in sorted_attrs: + if key == 'xmlns': + continue val = ustr(node.attrs[key]) # like XMLescape() but with whitespace and without > s = s + ' %s="%s"' % ( key, normalise_attr(val) )