diff options
author | Alexander Alexeev | 2017-04-05 23:10:18 +0700 |
---|---|---|
committer | Alexander Alexeev | 2017-04-05 23:10:18 +0700 |
commit | 79317e4ca1d023019f9a30cf7bed7b0231b57b71 (patch) | |
tree | 6dd3106034dfdd0a59e06595274c836a6996a948 /juick-server/src/main/java/com | |
parent | 6b96d8ba8330dff9b25cb3e00c75c6ea20134ca8 (diff) |
bugfix: null pointer exception
Diffstat (limited to 'juick-server/src/main/java/com')
-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; |