瀏覽代碼

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;
 		}
 		
+		// dedup
+		$answers = array_unique($answers);
+		
 		if(
 			!$invalid &&
 			$key !== false // has captcha been gen'd?