Fix cookie TTL warning (#1485)

environments/ppa-mbqj77/deployments/199
Christophe Maudoux 7 years ago
parent fc35c035a0
commit ad73673f86
  1. 10
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm

@ -250,12 +250,16 @@ sub tests {
);
},
# Warn if cookie TTL is equal or lower than 30s
# Warn if cookie TTL is equal or lower than one hour
cookieTTL => sub {
return 1 unless ( defined $conf->{cookieExpiration} );
if ( $conf->{cookieExpiration} =~ /^(\d+)s?$/ ) {
return ( 0, "Cookie TTL must be higher than 30s" )
unless ( $1 > 30 );
return ( 1, "Cookie TTL should be higher than one hour" )
unless ( $1 > 3600 );
}
if ( $conf->{cookieExpiration} =~ /^(\d+)m$/ ) {
return ( 1, "Cookie TTL should be higher than one hour" )
unless ( $1 > 60 );
}
# Return

Loading…
Cancel
Save