Skip to content

Commit

Permalink
Changed the configuration value names
Browse files Browse the repository at this point in the history
  • Loading branch information
kiamlaluno committed Apr 13, 2024
1 parent e8c8478 commit 2e7ceb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/modules/user/tests/user.test
Expand Up @@ -2080,7 +2080,7 @@ class UserEditTestCase extends BackdropWebTestCase {
$this->backdropLogin($user1);

// Test that multiple failed password validations trigger flood control.
config_set('user.flood', 'failed_login_limit', 2);
config_set('user.flood', 'flood_user_limit', 2);
flood_clear_event('failed_pass_validation_user', $user1->uid);
$edit = array();
$edit['mail'] = $this->randomName() . '@new.example.com';
Expand Down
4 changes: 2 additions & 2 deletions core/modules/user/user.module
Expand Up @@ -1055,8 +1055,8 @@ function user_validate_current_pass(&$form, &$form_state) {
// Default is to allow 5 failed passwords validations every 6 hours to
// prevent brute force attacks.
$identifier = $account->uid;
$user_pass_reset_user_window = $flood_config->get('failed_login_window', 21600);
$user_pass_reset_user_limit = $flood_config->get('failed_login_limit', 5);
$user_pass_reset_user_window = $flood_config->get('flood_user_window', 21600);
$user_pass_reset_user_limit = $flood_config->get('flood_user_limit', 5);
if (!flood_is_allowed('failed_pass_validation_user', $user_pass_reset_user_limit, $user_pass_reset_user_window, $identifier)) {
form_set_error('current_pass', format_plural($user_pass_reset_user_limit, 'Sorry, you have entered incorrect password more than once. Changes to fields that require current password are temporarily blocked. Try again later.', 'Sorry, you have entered incorrect password more than @count times. Changes to fields that require current password are temporarily blocked. Try again later.'));
break;
Expand Down

0 comments on commit 2e7ceb0

Please sign in to comment.