Update default values & Tidy (#2243)

v2.11
Christophe Maudoux 5 years ago
parent e35209c761
commit 7be0240389
  1. 2
      lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/DefaultValues.pm
  2. 2
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm
  3. 3
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm
  4. 2
      lemonldap-ng-manager/site/htdocs/static/struct.json
  5. 2
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/BruteForceProtection.pm

@ -19,7 +19,7 @@ sub defaultValues {
'authentication' => 'Demo',
'available2F' => 'UTOTP,TOTP,U2F,REST,Mail2F,Ext2F,Yubikey,Radius',
'available2FSelfRegistration' => 'TOTP,U2F,Yubikey',
'bruteForceProtectionLockTimes' => '5, 15, 60, 300, 600',
'bruteForceProtectionLockTimes' => '15, 30, 60, 300, 600',
'bruteForceProtectionMaxAge' => 300,
'bruteForceProtectionMaxFailed' => 3,
'bruteForceProtectionMaxLockTime' => 900,

@ -658,7 +658,7 @@ sub attributes {
'type' => 'bool'
},
'bruteForceProtectionLockTimes' => {
'default' => '5, 15, 60, 300, 600',
'default' => '15, 30, 60, 300, 600',
'type' => 'text'
},
'bruteForceProtectionMaxAge' => {

@ -692,6 +692,9 @@ sub tests {
'Number of failed logins must be higher than 1 to enable "BruteForceProtection" plugin'
) unless ( $conf->{failedLoginNumber} > 1 );
return ( 1,
'Number of allowed failed logins must be higher than 0 to enable "BruteForceProtection" plugin'
) unless ( $conf->{bruteForceProtectionMaxFailed} > 0 );
return ( 1,
'Number of failed logins history must be higher or equal than allowed failed logins plus lock time values'
)
if ( $conf->{bruteForceProtectionIncrementalTempo}

File diff suppressed because one or more lines are too long

@ -61,7 +61,7 @@ sub init {
sort { $a <=> $b }
map {
$_ =~ s/\D//;
$_ < $self->conf->{bruteForceProtectionMaxLockTime} ? $_ : ()
abs $_ < $self->conf->{bruteForceProtectionMaxLockTime} ? abs $_ : ()
}
grep { /\d+/ }
split /\s*,\s*/, $self->conf->{bruteForceProtectionLockTimes};

Loading…
Cancel
Save