Skip to content

Added null assertions for the parameters in Saml2LogoutRequest constructor #12798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration;
import org.springframework.security.saml2.provider.service.registration.Saml2MessageBinding;
import org.springframework.security.saml2.provider.service.web.authentication.logout.Saml2LogoutRequestResolver;
import org.springframework.util.Assert;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.web.util.UriUtils;

Expand Down Expand Up @@ -69,6 +70,12 @@ private Saml2LogoutRequest(String location, Saml2MessageBinding binding, Map<Str

private Saml2LogoutRequest(String location, Saml2MessageBinding binding, Map<String, String> parameters, String id,
String relyingPartyRegistrationId, Function<Map<String, String>, String> encoder) {
Assert.notNull(location, "location cannot be null");
Assert.notNull(binding, "binding cannot be null");
Assert.notNull(parameters, "parameters cannot be null");
Assert.notNull(id, "id cannot be null");
Assert.notNull(relyingPartyRegistrationId, "relyingPArtyRegistrationId cannot be null");
Assert.notNull(encoder, "encoder cannot be null");
this.location = location;
this.binding = binding;
this.parameters = Collections.unmodifiableMap(new LinkedHashMap<>(parameters));
Expand Down