aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2017-04-05 23:10:18 +0700
committerGravatar Alexander Alexeev2017-04-05 23:10:18 +0700
commit79317e4ca1d023019f9a30cf7bed7b0231b57b71 (patch)
tree6dd3106034dfdd0a59e06595274c836a6996a948 /juick-server/src/main/java/com
parent6b96d8ba8330dff9b25cb3e00c75c6ea20134ca8 (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.java6
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 ce48adbe7..d1358a208 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;