|
|
|
@ -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 |
|
|
|
|