Commit 605514e7 authored by Yadd's avatar Yadd
Browse files

Avoid some warnings (#595)

parent b3e18e2f
...@@ -811,7 +811,7 @@ sub extractFormInfo { ...@@ -811,7 +811,7 @@ sub extractFormInfo {
my ( $idp, $idp_cookie ) = $self->getIDP($req); my ( $idp, $idp_cookie ) = $self->getIDP($req);
# Get confirmation flag # Get confirmation flag
my $confirm_flag = $req->param("confirm"); my $confirm_flag = $req->param("confirm") // 0;
# If confirmation is -1 from resolved IDP screen, # If confirmation is -1 from resolved IDP screen,
# or IDP was not resolve, let the user choose its IDP # or IDP was not resolve, let the user choose its IDP
......
...@@ -47,7 +47,7 @@ sub init { ...@@ -47,7 +47,7 @@ sub init {
my $saml_sso_art_url_ret = $self->getMetaDataURL( my $saml_sso_art_url_ret = $self->getMetaDataURL(
"samlIDPSSODescriptorSingleSignOnServiceHTTPArtifact", 2 ); "samlIDPSSODescriptorSingleSignOnServiceHTTPArtifact", 2 );
$self->ssoUrlRe( $self->ssoUrlRe(
qr/^(\Q$saml_sso_soap_url\E|\Q$saml_sso_soap_url_ret\E|\Q$saml_sso_get_url\E|\Q$saml_sso_get_url_ret\E|\Q$saml_sso_post_url\E|\Q$saml_sso_post_url_ret\E|\Q$saml_sso_art_url\E|\Q$saml_sso_art_url_ret\E)$/i qr/^\Q($saml_sso_soap_url|$saml_sso_soap_url_ret|$saml_sso_get_url|$saml_sso_get_url_ret|$saml_sso_post_url|$saml_sso_post_url_ret|$saml_sso_art_url|$saml_sso_art_url_ret)\E$/i
); );
my $saml_slo_soap_url = my $saml_slo_soap_url =
......
...@@ -134,7 +134,8 @@ sub loadService { ...@@ -134,7 +134,8 @@ sub loadService {
# Create Lasso server with service metadata # Create Lasso server with service metadata
my $server = $self->createServer( my $server = $self->createServer(
$service_metadata->serviceToXML( $service_metadata->serviceToXML(
$self->conf->{templateDir} . "/common/saml2-metadata.tpl", $self->conf $self->conf->{templateDir} . "/common/saml2-metadata.tpl",
$self->conf
), ),
$self->conf->{samlServicePrivateKeySig}, $self->conf->{samlServicePrivateKeySig},
$self->conf->{samlServicePrivateKeySigPwd}, $self->conf->{samlServicePrivateKeySigPwd},
...@@ -1420,9 +1421,9 @@ sub getMetaDataURL { ...@@ -1420,9 +1421,9 @@ sub getMetaDataURL {
$index = 3 unless defined $index; $index = 3 unless defined $index;
$full = 0 unless defined $full; $full = 0 unless defined $full;
return unless defined $self->conf->{$key}; return '' unless defined $self->conf->{$key};
my $url = ( split( /;/, $self->conf->{$key} ) )[$index]; my $url = ( split( /;/, $self->conf->{$key} ) )[$index] || '';
# Get portal value # Get portal value
my $portal = $self->conf->{portal}; my $portal = $self->conf->{portal};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment