Fix NPE when checking an access token's locked ips

This commit is contained in:
Colin McDonald 2016-07-09 17:14:04 -04:00
parent a99d10c002
commit 5de25c498b

View File

@ -38,7 +38,7 @@ public final class ActorAttributeHandler implements Handler<RoutingContext> {
return; return;
} }
if (!accessToken.getLockedIps().isEmpty()) { if (accessToken.getLockedIps() != null && !accessToken.getLockedIps().isEmpty()) {
boolean allowed = accessToken.getLockedIps().contains(ctx.request().remoteAddress().host()); boolean allowed = accessToken.getLockedIps().contains(ctx.request().remoteAddress().host());
if (!allowed) { if (!allowed) {