From b66a61addb6c8e66cb26fcf74b532d68891267e4 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 23 May 2018 22:23:28 +0200 Subject: Refactored code, many fixes and improvements in chat backend+frontend --- main/app/sprinkles/account/config/production.php | 124 +++++++++++------------ 1 file changed, 62 insertions(+), 62 deletions(-) (limited to 'main/app/sprinkles/account/config/production.php') diff --git a/main/app/sprinkles/account/config/production.php b/main/app/sprinkles/account/config/production.php index b7c3288..42b8ada 100644 --- a/main/app/sprinkles/account/config/production.php +++ b/main/app/sprinkles/account/config/production.php @@ -1,67 +1,67 @@ [ - 'check_username_request' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 40 => 1000 - ] - ], - 'password_reset_request' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 2 => 5, - 3 => 10, - 4 => 20, - 5 => 40, - 6 => 80, - 7 => 600 - ] - ], - 'registration_attempt' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 2 => 5, - 3 => 10, - 4 => 20, - 5 => 40, - 6 => 80, - 7 => 600 - ] - ], - 'sign_in_attempt' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 4 => 5, - 5 => 10, - 6 => 20, - 7 => 40, - 8 => 80, - 9 => 600 - ] - ], - 'verification_request' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 2 => 5, - 3 => 10, - 4 => 20, - 5 => 40, - 6 => 80, - 7 => 600 - ] +return [ + // See http://security.stackexchange.com/a/59550/74909 for the inspiration for our throttling system + 'throttles' => [ + 'check_username_request' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 40 => 1000 + ] + ], + 'password_reset_request' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 2 => 5, + 3 => 10, + 4 => 20, + 5 => 40, + 6 => 80, + 7 => 600 + ] + ], + 'registration_attempt' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 2 => 5, + 3 => 10, + 4 => 20, + 5 => 40, + 6 => 80, + 7 => 600 + ] + ], + 'sign_in_attempt' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 4 => 5, + 5 => 10, + 6 => 20, + 7 => 40, + 8 => 80, + 9 => 600 + ] + ], + 'verification_request' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 2 => 5, + 3 => 10, + 4 => 20, + 5 => 40, + 6 => 80, + 7 => 600 ] ] - ]; + ] +]; -- cgit v1.2.3