Improve CSRF token test

environments/ppa-mbqj77/deployments/262
Christophe Maudoux 7 years ago
parent 338abbbc5f
commit 59550d3a5a
  1. 4
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm

@ -529,8 +529,8 @@ sub tests {
# Warn if XSRF token TTL is higher than 10s
formTimeout => sub {
return 1 unless ( defined $conf->{formTimeout} );
return ( 0, "XSRF form token TTL must be higher than 10s" )
unless ( $conf->{formTimeout} > 10 );
return ( 0, "XSRF form token TTL must be higher than 30s" )
unless ( $conf->{formTimeout} > 30 );
return ( 1, "XSRF form token TTL should not be higher than 2mn" )
if ( $conf->{formTimeout} > 120 );

Loading…
Cancel
Save