Use Base64 encoder with no CRLF in output for SAML 2.0 messages

Closes gh-11262
This commit is contained in:
Juny Tse
2022-05-21 23:58:37 +08:00
committed by Josh Cummings
parent 53e509f0c6
commit 16664dcdbd
7 changed files with 9 additions and 14 deletions

View File

@@ -307,7 +307,7 @@ public class Saml2LoginConfigurerTests {
public void authenticateWithInvalidDeflatedSAMLResponseThenFailureHandlerUses() throws Exception {
this.spring.register(CustomAuthenticationFailureHandler.class).autowire();
byte[] invalidDeflated = "invalid".getBytes();
String encoded = Saml2Utils.samlEncodeNotRfc2045(invalidDeflated);
String encoded = Saml2Utils.samlEncode(invalidDeflated);
MockHttpServletRequestBuilder request = get("/login/saml2/sso/registration-id").queryParam("SAMLResponse",
encoded);
this.mvc.perform(request);