diff --git a/src/main/java/net/frozenorb/apiv3/route/disposableLoginTokens/POSTDisposableLoginTokens.java b/src/main/java/net/frozenorb/apiv3/route/disposableLoginTokens/POSTDisposableLoginTokens.java index 313fcd0..5d6ffe8 100644 --- a/src/main/java/net/frozenorb/apiv3/route/disposableLoginTokens/POSTDisposableLoginTokens.java +++ b/src/main/java/net/frozenorb/apiv3/route/disposableLoginTokens/POSTDisposableLoginTokens.java @@ -23,7 +23,7 @@ public final class POSTDisposableLoginTokens implements Handler return; } - if (IpUtils.isValidIp(userIp)) { + if (!IpUtils.isValidIp(userIp)) { ErrorUtils.respondInvalidInput(ctx, "Ip address \"" + userIp + "\" is not valid."); return; } diff --git a/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdRequiresTotp.java b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdRequiresTotp.java index c4e9c41..c1342c2 100644 --- a/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdRequiresTotp.java +++ b/src/main/java/net/frozenorb/apiv3/route/users/GETUsersIdRequiresTotp.java @@ -25,7 +25,7 @@ public final class GETUsersIdRequiresTotp implements Handler { String userIp = ctx.request().getParam("userIp"); - if (IpUtils.isValidIp(userIp)) { + if (!IpUtils.isValidIp(userIp)) { ErrorUtils.respondInvalidInput(ctx, "Ip address \"" + userIp + "\" is not valid."); return; }