You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C14N sorts namespace prefixes with localeCompare and attributes by namespaceURI + localName #664
C14nCanonicalization and ExclusiveCanonicalization do not order namespace declarations and attributes as Canonical XML requires: namespace nodes by prefix, attributes by namespace URI then local name, both compared by code point (C14N 1.0 §2.2). Other implementations produce different octets for these inputs, so digests do not match.
ExclusiveCanonicalization gives the same wrong attribute order for the last two inputs.
Tested with xml-crypto 6.4.0 and master (84df780), @xmldom/xmldom 0.9.12, Node.js 26.13.0.
In src/c14n-canonicalization.ts and src/exclusive-canonicalization.ts, nsCompare uses localeCompare (locale collation, so ds sorts before SOAP-ENV), attrCompare compares the concatenation namespaceURI + localName (urn:a + zb sorts after urn:az + a) with <, which compares UTF-16 code units and puts U+10000 before U+F900.
Activity