Skip to content
Snippets Groups Projects

Issue #3328456: Replace substr($a, 0, $i) with str_starts_with()

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
210 210 $form_state->set('flood_control_user_identifier', $identifier);
211 211
212 // Don't allow login if the limit for this user has been reached.
213 // Default is to allow 5 failed attempts every 6 hours.
214 if (!$this->userFloodControl->isAllowed('user.failed_login_user', $flood_config->get('user_limit'), $flood_config->get('user_window'), $identifier)) {
215 $form_state->set('flood_control_triggered', 'user');
216 return;
212 // If there are zero flood records for this user, then we don't need to
213 // clear any failed login attempts after a successful login, so check
214 // for this case first before checking the actual flood limit and store
215 // the result in form state.
216 if (!$this->userFloodControl->isAllowed('user.failed_login_user', 1, $flood_config->get('user_window'), $identifier)) {
217 // Now check the actual limit for the user. Default is to allow 5
218 // failed attempts every 6 hours. This means we check the flood table
219 // twice if flood control has already been triggered by a previous
220 // login attempt, bu this should be the less common case.
  • dimitriskr added 1172 commits

    added 1172 commits

    • 52b6d537...b6aef35b - 133 commits from branch project:10.1.x
    • b6aef35b...8f3f3749 - 1029 earlier commits
    • c8a07913 - Issue #3387163 by smustgrave, larowlan, alexpott, xjm, quietone: Decouple tour...
    • 5bf40faa - Issue #3409982 by claudiu.cristea, longwave, alexpott, catch, Ghost of Drupal...
    • b378c411 - Issue #3412135 by markdorison: Output buffering status check fails when run via CLI
    • b7f45944 - Issue #3411921 by catch: Start FunctionalJavaScript tests before Functional tests
    • 7b49d870 - Issue #3364108 by Wim Leers, borisson_, phenaproxima, bircher: Configuration schema & required keys
    • c271adbb - Issue #1349080 by Nephele, freelock, Spokje, quietone, Lendude, agentrickard,...
    • 16e71c8d - Replace most potential uses of str_starts_with().
    • e7b0c6c7 - A couple more merge-safe changes.
    • 15b09a9f - Fix substr() to str_starts_with() in moved code from #1845004.
    • d4c80554 - Update phpstan baseline

    Compare with previous version

  • dimitriskr added 3 commits

    added 3 commits

    Compare with previous version

  • dimitriskr added 2 commits

    added 2 commits

    • 0af00e52 - Revert "fix phpstan config"
    • 2961890f - Revert "Update phpstan baseline"

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading