Explorar o código

captcha bruteforce fix

lolcat hai 3 meses
pai
achega
4349bf232d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      lib/bot_protection.php

+ 3 - 0
lib/bot_protection.php

@@ -133,6 +133,9 @@ class bot_protection{
 			$answers[] = $regex;
 		}
 		
+		// dedup
+		$answers = array_unique($answers);
+		
 		if(
 			!$invalid &&
 			$key !== false // has captcha been gen'd?