mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Fix #1232 allow multiple auth attempts in a configured time
This commit is contained in:
parent
3bccc9ff2d
commit
ecd8cd3ded
6 changed files with 41 additions and 6 deletions
|
|
@ -195,6 +195,8 @@ class memberAdminController extends member
|
|||
$args = Context::gets(
|
||||
'enable_join',
|
||||
'enable_confirm',
|
||||
'authmail_expires',
|
||||
'authmail_expires_unit',
|
||||
'password_strength',
|
||||
'password_hashing_algorithm',
|
||||
'password_hashing_work_factor',
|
||||
|
|
@ -205,6 +207,17 @@ class memberAdminController extends member
|
|||
'member_profile_view'
|
||||
);
|
||||
|
||||
$args->authmail_expires = max(0, intval($args->authmail_expires));
|
||||
if(!$args->authmail_expires)
|
||||
{
|
||||
$args->authmail_expires = 1;
|
||||
}
|
||||
$args->authmail_expires_unit = intval($args->authmail_expires_unit);
|
||||
if(!in_array($args->authmail_expires_unit, [1, 60, 3600, 86400]))
|
||||
{
|
||||
$args->authmail_expires_unit = 86400;
|
||||
}
|
||||
|
||||
if(!array_key_exists($args->password_hashing_algorithm, Rhymix\Framework\Password::getSupportedAlgorithms()))
|
||||
{
|
||||
$args->password_hashing_algorithm = 'md5';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue