From 1e0ff760651f5e3cd25044566835dbd20d4ab2c3 Mon Sep 17 00:00:00 2001 From: Yuriy Movchan Date: Fri, 16 Dec 2022 12:04:05 +0300 Subject: [PATCH] fix: catch org.eclipse.jetty.http.BadMessageException: in (#3330) CorsFilter #3329 --- .../src/main/java/io/jans/as/server/filter/CorsFilter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jans-auth-server/server/src/main/java/io/jans/as/server/filter/CorsFilter.java b/jans-auth-server/server/src/main/java/io/jans/as/server/filter/CorsFilter.java index 1a2a45c444e..3e27aae2f86 100644 --- a/jans-auth-server/server/src/main/java/io/jans/as/server/filter/CorsFilter.java +++ b/jans-auth-server/server/src/main/java/io/jans/as/server/filter/CorsFilter.java @@ -27,8 +27,10 @@ import java.io.IOException; import java.net.URLDecoder; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.List; /** @@ -104,7 +106,7 @@ public void init(final FilterConfig filterConfig) throws ServletException { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { - Collection globalAllowedOrigins = null; + Collection globalAllowedOrigins = new ArrayList<>(0); if (this.filterEnabled) { try { globalAllowedOrigins = doFilterImpl(servletRequest);