Browse Source

! prevent slamming the password reminder function
! change sendtopc to sendtopic in spamProtection

Signed-off-by: Spuds <[email protected]>

Spuds 12 years ago
parent
commit
7cac96e441

+ 3 - 0
Sources/Reminder.php

@@ -70,6 +70,9 @@ function RemindPick()
 	// You must enter a username/email address.
 	if (empty($where))
 		fatal_lang_error('username_no_exist', false);
+		
+	// Make sure we are not being slammed
+	spamProtection('remind');
 
 	// Find the user!
 	$request = $smcFunc['db_query']('', '

+ 2 - 1
Sources/Security.php

@@ -1101,7 +1101,8 @@ function spamProtection($error_type)
 	$timeOverrides = array(
 		'login' => 2,
 		'register' => 2,
-		'sendtopc' => $modSettings['spamWaitTime'] * 4,
+		'loginremind' => 30,
+		'sendtopic' => $modSettings['spamWaitTime'] * 4,
 		'sendmail' => $modSettings['spamWaitTime'] * 5,
 		'reporttm' => $modSettings['spamWaitTime'] * 4,
 		'search' => !empty($modSettings['search_floodcontrol_time']) ? $modSettings['search_floodcontrol_time'] : 1,

+ 1 - 1
Sources/SendTopic.php

@@ -91,7 +91,7 @@ function SendTopic()
 
 	// Actually send the message...
 	checkSession();
-	spamProtection('sendtopc');
+	spamProtection('sendtopic');
 
 	// This is needed for sendmail().
 	require_once($sourcedir . '/Subs-Post.php');

+ 2 - 1
Themes/default/languages/Errors.english.php

@@ -206,9 +206,10 @@ $txt['registerWaitTime_broken'] = 'You already registered just %1$d seconds ago!
 $txt['loginWaitTime_broken'] = 'You will have to wait about %1$d seconds to login again, sorry.';
 $txt['pmWaitTime_broken'] = 'The last personal message from your IP was less than %1$d seconds ago. Please try again later.';
 $txt['reporttmWaitTime_broken'] = 'The last topic report from your IP was less than %1$d seconds ago. Please try again later.';
-$txt['sendtopcWaitTime_broken'] = 'The last topic sent from your IP was less than %1$d seconds ago. Please try again later.';
+$txt['sendtopicWaitTime_broken'] = 'The last topic sent from your IP was less than %1$d seconds ago. Please try again later.';
 $txt['sendmailWaitTime_broken'] = 'The last email sent from your IP was less than %1$d seconds ago. Please try again later.';
 $txt['searchWaitTime_broken'] = 'Your last search was less than %1$d seconds ago. Please try again later.';
+$txt['remindWaitTime_broken'] = 'Your last reminder was less than %1$d seconds ago. Please try again later.';
 
 $txt['email_missing_data'] = 'You must enter something in both the subject and message boxes.';