diff options
Diffstat (limited to 'juick-server/src/main')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/security/HashParamAuthenticationFilter.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/security/HashParamAuthenticationFilter.java b/juick-server/src/main/java/com/juick/server/security/HashParamAuthenticationFilter.java index ce48adbe..d1358a20 100644 --- a/juick-server/src/main/java/com/juick/server/security/HashParamAuthenticationFilter.java +++ b/juick-server/src/main/java/com/juick/server/security/HashParamAuthenticationFilter.java @@ -76,8 +76,10 @@ public class HashParamAuthenticationFilter extends OncePerRequestFilter { if (hash == null) hash = request.getParameter(PARAM_NAME); - if (hash == null) - for (Cookie cookie : request.getCookies()) + Cookie[] cookies = request.getCookies(); + + if (hash == null && cookies != null) + for (Cookie cookie : cookies) if (PARAM_NAME.equals(cookie.getName())) { hash = cookie.getValue(); break; |