From e19e7bef2d0b0da3166c0cac33e8559f288de509 Mon Sep 17 00:00:00 2001 From: mghalbi Date: Fri, 24 Feb 2023 12:08:17 +0100 Subject: [PATCH] fix error in check mediaType --- .../src/main/java/org/keycloak/services/HttpRequestImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/services/HttpRequestImpl.java b/services/src/main/java/org/keycloak/services/HttpRequestImpl.java index 102f94dbea..067083d054 100644 --- a/services/src/main/java/org/keycloak/services/HttpRequestImpl.java +++ b/services/src/main/java/org/keycloak/services/HttpRequestImpl.java @@ -60,7 +60,7 @@ public class HttpRequestImpl implements HttpRequest { return null; } MediaType mediaType = getHttpHeaders().getMediaType(); - if (mediaType.isCompatible(MediaType.valueOf("application/x-www-form-urlencoded"))) { + if (mediaType == null || !mediaType.isCompatible(MediaType.valueOf("application/x-www-form-urlencoded"))) { return new MultivaluedHashMap<>(); } return delegate.getDecodedFormParameters();