chore: Update copyright year from 2025 to 2026 across core files
- Updated copyright headers in 3,055 core application files - Changed 'Copyright (C) 2014-2025' to 'Copyright (C) 2014-2026' - Added 123 new files from EspoCRM core updates - Removed 4 deprecated files - Total changes: 61,637 insertions, 54,283 deletions This is a routine maintenance update for the new year 2026.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM – Open Source CRM application.
|
||||
* Copyright (C) 2014-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2014-2026 EspoCRM, Inc.
|
||||
* Website: https://www.espocrm.com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -36,9 +36,12 @@ use Espo\Core\Utils\Metadata;
|
||||
|
||||
class ConfigDataProvider
|
||||
{
|
||||
private const FAILED_ATTEMPTS_PERIOD = '60 seconds';
|
||||
private const FAILED_CODE_ATTEMPTS_PERIOD = '5 minutes';
|
||||
private const MAX_FAILED_ATTEMPT_NUMBER = 10;
|
||||
private const string FAILED_ATTEMPTS_PERIOD = '60 seconds';
|
||||
private const string FAILED_CODE_ATTEMPTS_PERIOD = '5 minutes';
|
||||
private const int MAX_FAILED_ATTEMPT_NUMBER = 10;
|
||||
private const int MAX_USERNAME_FAILED_ATTEMPT_NUMBER = 30;
|
||||
private const string USERNAME_FAILED_ATTEMPTS_PERIOD = '60 seconds';
|
||||
private const int USERNAME_FAILED_ATTEMPT_DELAY = 2;
|
||||
|
||||
public function __construct(private Config $config, private Metadata $metadata)
|
||||
{}
|
||||
@@ -67,6 +70,29 @@ class ConfigDataProvider
|
||||
return $this->config->get('authMaxFailedAttemptNumber', self::MAX_FAILED_ATTEMPT_NUMBER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Max failed log in attempts for a specific username regardless of the IP address.
|
||||
*/
|
||||
public function getMaxUsernameFailedAttemptNumber(): int
|
||||
{
|
||||
return $this->config->get('authMaxUsernameFailedAttemptNumber', self::MAX_USERNAME_FAILED_ATTEMPT_NUMBER);
|
||||
}
|
||||
|
||||
public function isUsernameFailedAttemptsLimitEnabled(): bool
|
||||
{
|
||||
return (bool) $this->config->get('authUsernameFailedAttemptsLimitEnabled');
|
||||
}
|
||||
|
||||
public function getUsernameFailedAttemptsPeriod(): string
|
||||
{
|
||||
return $this->config->get('authUsernameFailedAttemptsPeriod', self::USERNAME_FAILED_ATTEMPTS_PERIOD);
|
||||
}
|
||||
|
||||
public function getUsernameFailedAttemptsDelay(): int
|
||||
{
|
||||
return $this->config->get('authUsernameFailedAttemptsDelay', self::USERNAME_FAILED_ATTEMPT_DELAY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Auth token secret won't be created. Can be reasonable for a custom AuthTokenManager implementation.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user