From 5de25c498bc1bc563992434374948540ad1f10f4 Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Sat, 9 Jul 2016 17:14:04 -0400 Subject: [PATCH] Fix NPE when checking an access token's locked ips --- .../java/net/frozenorb/apiv3/handler/ActorAttributeHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/frozenorb/apiv3/handler/ActorAttributeHandler.java b/src/main/java/net/frozenorb/apiv3/handler/ActorAttributeHandler.java index fd5192e..753c875 100644 --- a/src/main/java/net/frozenorb/apiv3/handler/ActorAttributeHandler.java +++ b/src/main/java/net/frozenorb/apiv3/handler/ActorAttributeHandler.java @@ -38,7 +38,7 @@ public final class ActorAttributeHandler implements Handler { return; } - if (!accessToken.getLockedIps().isEmpty()) { + if (accessToken.getLockedIps() != null && !accessToken.getLockedIps().isEmpty()) { boolean allowed = accessToken.getLockedIps().contains(ctx.request().remoteAddress().host()); if (!allowed) {