[XML-SIG] [ pyxml-Patches-829905 ] c14n.py fix for bug #825115

SourceForge.net noreply at sourceforge.net
Fri Oct 24 19:43:31 EDT 2003


Patches item #829905, was opened at 2003-10-24 16:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=306473&aid=829905&group_id=6473

Category: DOM
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Keith Beattie (ksbeattie)
Assigned to: Nobody/Anonymous (nobody)
Summary: c14n.py fix for bug #825115

Initial Comment:
The problem is that when inheriting attributes via the
initial_other_attrs arg of _do_element(), the xmlns
ones are not sorted by _sorter_ns() as they should be.
 The attached patch to c14n.py causes such inherited
attribs to be sorted properly. 

Also attached is a patch to test_c14n.py to add a test
case for this bug.

What is very curious about this is that the test case
I've added will pass with the old code.  This is
because PyExpat dom parser has a bug in it that
counteracts this one.  Namely that default namespace
attrib (xmlns='foo') are given a localName of None by
pyexpat and not 'xmlns'.  Since default namespace
attribs are ordered first by c14n, when using PyExpat,
c14n luckly does the right thing.  Changing
text_c14n.py to use another dom is probably a good idea...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=306473&aid=829905&group_id=6473



More information about the XML-SIG mailing list