Commit e8faf8a6 authored by Victor Näslund's avatar Victor Näslund

improved logic

parent cfb18f02
...@@ -198,24 +198,14 @@ public class TOTPThrottle { ...@@ -198,24 +198,14 @@ public class TOTPThrottle {
// Look into our map and se if user should be allow to attempt to login or not // Look into our map and se if user should be allow to attempt to login or not
public static boolean validateUsername(final String username) { public static boolean validateUsername(final String username) {
// Return true if username is not bruteforcing // Return true if username is not bruteforcing
if (validateMap(username, usernames)) { return validateMap(username, usernames);
return true;
}
return false;
} }
// Look into our map and se if ip should be allow to attempt to login or not // Look into our map and se if ip should be allow to attempt to login or not
public static boolean validateIPAddress(final String ip) { public static boolean validateIPAddress(final String ip) {
// Return true if ip is not bruteforcing // Return true if ip is not bruteforcing
if (validateMap(ip, IPAddresses)) { return validateMap(ip, IPAddresses);
return true;
}
return false;
} }
// User passed a loginattempt so we clear the user from our maps // User passed a loginattempt so we clear the user from our maps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment