소스 검색

! Don't call spamProtection when coming from the "Choose a password reminder type" page (fixes #791).

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 10 년 전
부모
커밋
2ad4b357b5
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      Sources/Reminder.php

+ 5 - 1
Sources/Reminder.php

@@ -72,7 +72,11 @@ function RemindPick()
 		fatal_lang_error('username_no_exist', false);
 
 	// Make sure we are not being slammed
-	spamProtection('remind');
+	// Don't call this if you're coming from the "Choose a reminder type" page - otherwise you'll likely get an error
+	if (!isset($_POST['reminder_type']) || !in_array($_POST['reminder_type'], array('email', 'secret')))
+	{
+		spamProtection('remind');
+	}
 
 	// Find the user!
 	$request = $smcFunc['db_query']('', '