Skip to content

Commit 811d140

Browse files
committed
test: the invalid-XML pin carries a failure status
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhMu5u3iHHSSD7mx8c
1 parent 6621d36 commit 811d140

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/plugins/plugin-auth/src/sso-saml-refusal-cause.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ describe('classifySamlRefusal: the first failing check in samlify order names th
102102
['an encrypted assertion under a configured Response signature', samlResponse({ assertion: 'encrypted', responseSignature: signature(CERT) }), CONFIG],
103103
['a missing status (samlify ERR_UNDEFINED_STATUS)', samlResponse({ status: null }), CONFIG],
104104
['a wrapped Assertion inside SubjectConfirmationData', samlResponse({ assertionSignature: signature(OTHER_CERT), confirmationExtra: '<saml:Assertion/>' }), CONFIG],
105-
['XML the vendor validator rejects', Buffer.from('<samlp:Response><unclosed></samlp:Response>').toString('base64'), CONFIG],
105+
// A failure status inside XML the vendor's validator rejects: the lenient
106+
// parser would read the status, so only the validator keeps it unnamed.
107+
['XML the vendor validator rejects', Buffer.from('<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"><samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Responder"/></samlp:Status><unclosed></samlp:Response>').toString('base64'), CONFIG],
106108
['a document that is not a Response', Buffer.from('<samlp:LogoutResponse/>').toString('base64'), CONFIG],
107109
['text that is not base64', 'not base64 at all!', CONFIG],
108110
['base64 that is not XML', Buffer.from('just words').toString('base64'), CONFIG],

0 commit comments

Comments
 (0)