Remove unless less statement
This commit is contained in:
parent
a7467b1d15
commit
644c62b81a
|
@ -3,9 +3,9 @@ require Exporter;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Digest::MD5;
|
use Digest::MD5;
|
||||||
use MIME::Base64 qw/encode_base64/;
|
use MIME::Base64 qw(encode_base64);
|
||||||
|
|
||||||
our $VERSION = '2.0.10';
|
our $VERSION = '2.0.14';
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @EXPORT_OK = qw(getSameSite getPSessionID genId2F);
|
our @EXPORT_OK = qw(getSameSite getPSessionID genId2F);
|
||||||
|
|
||||||
|
@ -20,32 +20,23 @@ sub genId2F {
|
||||||
"" );
|
"" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub getSameSite {
|
sub getSameSite {
|
||||||
my ($conf) = @_;
|
my ($conf) = @_;
|
||||||
|
|
||||||
# Initialize cookie SameSite value
|
# Initialize cookie SameSite value
|
||||||
unless ( $conf->{sameSite} ) {
|
return $conf->{sameSite} if $conf->{sameSite};
|
||||||
|
|
||||||
# SAML requires SameSite=None for POST bindings
|
# SAML requires SameSite=None for POST bindings
|
||||||
if ( $conf->{issuerDBSAMLActivation}
|
return (
|
||||||
or keys %{ $conf->{samlIDPMetaDataXML} } )
|
$conf->{issuerDBSAMLActivation}
|
||||||
{
|
or keys %{ $conf->{samlIDPMetaDataXML} }
|
||||||
return "None";
|
) ? 'None' : 'Lax';
|
||||||
}
|
|
||||||
else {
|
|
||||||
return "Lax";
|
|
||||||
}
|
|
||||||
|
|
||||||
# if CDA, OIDC, CAS: Lax
|
# if CDA, OIDC, CAS: Lax
|
||||||
# TODO: try to detect when we can use 'Strict'?
|
# TODO: try to detect when we can use 'Strict'?
|
||||||
# Any scenario that uses pdata to save state during login,
|
# Any scenario that uses pdata to save state during login,
|
||||||
# Issuers, and CDA all require at least Lax
|
# Issuers, and CDA all require at least Lax
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return $conf->{sameSite};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
__END__
|
||||||
|
|
Loading…
Reference in New Issue
Block a user