ソースを参照

captcha bruteforce fix

lolcat 3 ヶ月 前
コミット
4349bf232d
1 ファイル変更3 行追加0 行削除
  1. 3 0
      lib/bot_protection.php

+ 3 - 0
lib/bot_protection.php

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