1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 10:15:55 +00:00

throttle login attempts, controlled by Config::AUTH_MIN_INTERVAL

This commit is contained in:
Andrew Dolgov
2021-03-12 09:35:01 +03:00
parent b9268fcc88
commit 580eccd3da
2 changed files with 30 additions and 0 deletions

View File

@@ -167,6 +167,9 @@ class Config {
const ENABLE_PLUGIN_INSTALLER = "ENABLE_PLUGIN_INSTALLER";
// allow installing first party plugins using plugin installer in prefs
const AUTH_MIN_INTERVAL = "AUTH_MIN_INTERVAL";
// minimum amount of seconds required between authentication attempts
// default values for all of the above:
private const _DEFAULTS = [
Config::DB_TYPE => [ "pgsql", Config::T_STRING ],
@@ -220,6 +223,7 @@ class Config {
Config::SESSION_NAME => [ "ttrss_sid", Config::T_STRING ],
Config::CHECK_FOR_PLUGIN_UPDATES => [ "true", Config::T_BOOL ],
Config::ENABLE_PLUGIN_INSTALLER => [ "true", Config::T_BOOL ],
Config::AUTH_MIN_INTERVAL => [ 5, Config::T_INT ],
];
private static $instance;