Commit 30aa96fc authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Prevent Lasso error in IDP initiated code (#1101)

parent 9fcbf8ed
......@@ -220,11 +220,13 @@ sub run {
$self->conf->{samlSPMetaDataOptions}
->{$idp_initiated_spConfKey}
->{samlSPMetaDataOptionsNameIDFormat} || "email";
$login->request()->NameIDPolicy()
->Format( $self->getNameIDFormat($nameIDFormatKey) );
eval {
$login->request()->NameIDPolicy()
->Format( $self->getNameIDFormat($nameIDFormatKey) );
};
# Force AllowCreate to TRUE
$login->request()->NameIDPolicy()->AllowCreate(1);
eval { $login->request()->NameIDPolicy()->AllowCreate(1); };
}
# Process authentication request
......
......@@ -1277,11 +1277,13 @@ sub issuerForAuthUser {
my $nameIDFormatKey =
$self->{samlSPMetaDataOptions}->{$idp_initiated_spConfKey}
->{samlSPMetaDataOptionsNameIDFormat} || "email";
$login->request()->NameIDPolicy()
->Format( $self->getNameIDFormat($nameIDFormatKey) );
eval {
$login->request()->NameIDPolicy()
->Format( $self->getNameIDFormat($nameIDFormatKey) );
};
# Force AllowCreate to TRUE
$login->request()->NameIDPolicy()->AllowCreate(1);
eval { $login->request()->NameIDPolicy()->AllowCreate(1); };
}
# Process authentication request
......
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