Skip to content

Commit 9732986

Browse files
committed
Fix: Handle InclusiveNamespaces in digest calculation for SAML Response
The issue was caused by the incorrect handling of the InclusiveNamespaces element in the digest calculation process. According to the XML-DSig, the exclusive canonicalization algorithm (XML-EXC-C14N) allows for canonicalizing XML without including predefined namespaces unless specified through the PrefixList attribute.
1 parent 3cc8c7c commit 9732986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

saml_sp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ async function digestSAML(signature, produce) {
960960
throw Error(`unexpected digest transform ${transforms[1]}`);
961961
}
962962

963-
const namespaces = transformAlgs[1].InclusiveNamespaces;
963+
const namespaces = transforms[1].InclusiveNamespaces;
964964
const prefixList = namespaces ? namespaces.$attr$PrefixList: null;
965965

966966
const withComments = transformAlgs[1].slice(39) == 'WithComments';

0 commit comments

Comments
 (0)