mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
Fix SAML logout log messages
Fixes SAML logout log messages incorrectly referring to logout response instead of logout request and vice versa. Closes gh-12129
This commit is contained in:
parent
fde26e003a
commit
ed3af6482d
@ -126,7 +126,7 @@ public final class OpenSamlLogoutRequestValidator implements Saml2LogoutRequestV
|
|||||||
RelyingPartyRegistration registration) {
|
RelyingPartyRegistration registration) {
|
||||||
return (errors) -> {
|
return (errors) -> {
|
||||||
if (request.getIssuer() == null) {
|
if (request.getIssuer() == null) {
|
||||||
errors.add(new Saml2Error(Saml2ErrorCodes.INVALID_ISSUER, "Failed to find issuer in LogoutResponse"));
|
errors.add(new Saml2Error(Saml2ErrorCodes.INVALID_ISSUER, "Failed to find issuer in LogoutRequest"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String issuer = request.getIssuer().getValue();
|
String issuer = request.getIssuer().getValue();
|
||||||
@ -142,7 +142,7 @@ public final class OpenSamlLogoutRequestValidator implements Saml2LogoutRequestV
|
|||||||
return (errors) -> {
|
return (errors) -> {
|
||||||
if (request.getDestination() == null) {
|
if (request.getDestination() == null) {
|
||||||
errors.add(new Saml2Error(Saml2ErrorCodes.INVALID_DESTINATION,
|
errors.add(new Saml2Error(Saml2ErrorCodes.INVALID_DESTINATION,
|
||||||
"Failed to find destination in LogoutResponse"));
|
"Failed to find destination in LogoutRequest"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String destination = request.getDestination();
|
String destination = request.getDestination();
|
||||||
|
@ -114,7 +114,7 @@ public final class Saml2LogoutResponseFilter extends OncePerRequestFilter {
|
|||||||
logoutRequest.getRelyingPartyRegistrationId());
|
logoutRequest.getRelyingPartyRegistrationId());
|
||||||
if (registration == null) {
|
if (registration == null) {
|
||||||
this.logger
|
this.logger
|
||||||
.trace("Did not process logout request since failed to find associated RelyingPartyRegistration");
|
.trace("Did not process logout response since failed to find associated RelyingPartyRegistration");
|
||||||
Saml2Error error = new Saml2Error(Saml2ErrorCodes.RELYING_PARTY_REGISTRATION_NOT_FOUND,
|
Saml2Error error = new Saml2Error(Saml2ErrorCodes.RELYING_PARTY_REGISTRATION_NOT_FOUND,
|
||||||
"Failed to find associated RelyingPartyRegistration");
|
"Failed to find associated RelyingPartyRegistration");
|
||||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST, error.toString());
|
response.sendError(HttpServletResponse.SC_BAD_REQUEST, error.toString());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user