Remove bad password list (for now) -- we'll eventually come back and implement this in a better way

This commit is contained in:
Colin McDonald 2016-06-21 01:18:38 -04:00
parent a5acd2c9ff
commit 1eb09b9714

View File

@ -1,6 +1,5 @@
package net.frozenorb.apiv3.route.emailToken;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import io.vertx.core.Handler;
import io.vertx.ext.web.RoutingContext;
@ -8,19 +7,10 @@ import net.frozenorb.apiv3.APIv3;
import net.frozenorb.apiv3.model.User;
import net.frozenorb.apiv3.util.ErrorUtils;
import java.util.List;
import java.util.concurrent.TimeUnit;
public final class POSTEmailTokenConfirm implements Handler<RoutingContext> {
private final List<String> commonPasswords = ImmutableList.copyOf(("123456 password 12345678 qwerty 123456789 12345 1234 111111 1234567 dragon " +
"123123 baseball abc123 football monkey letmein 696969 shadow master 666666 qwertyuiop 123321 mustang 1234567890 " +
"michael 654321 pussy superman 1qaz2wsx 7777777 fuckyou 121212 000000 qazwsx 123qwe killer trustno1 jordan jennifer " +
"zxcvbnm asdfgh hunter buster soccer harley batman andrew tigger sunshine iloveyou fuckme 2000 charlie robert thomas " +
"hockey ranger daniel starwars klaster 112233 george asshole computer michelle jessica pepper 1111 zxcvbn 555555 11111111" +
" 131313 freedom 777777 pass fuck maggie 159753 aaaaaa ginger princess joshua cheese amanda summer love ashley 6969 " +
"nicole chelsea biteme matthew access yankees 987654321 dallas austin thunder taylor matrix").split(" "));
public void handle(RoutingContext ctx) {
User user = User.findByEmailTokenSync(ctx.request().getParam("emailToken"));
@ -46,9 +36,6 @@ public final class POSTEmailTokenConfirm implements Handler<RoutingContext> {
if (password.length() < 8) {
ErrorUtils.respondGeneric(ctx, 200, "Your password is too short.");
return;
} else if (commonPasswords.contains(password)) {
ErrorUtils.respondGeneric(ctx, 200, "Your password is too common. Please use a more secure password.");
return;
}
user.setEmailToken(null);