Commit 408a2157 authored by Maxime Besson's avatar Maxime Besson

Merge branch 'issue-1893' into 'v2.0'

Set issuer urldc in pdata (#1893)

See merge request !93
parents 9ea62d67 a130cd38
Pipeline #6730 passed with stage
in 13 minutes and 52 seconds
......@@ -91,6 +91,7 @@ sub _redirect {
'Add ' . $self->ipath . ', ' . $self->ipath . 'Path in keepPdata' );
push @{ $req->pdata->{keepPdata} }, $self->ipath, $self->ipath . 'Path';
$req->{urldc} = $self->conf->{portal} . '/' . $self->path;
$req->pdata->{_url} = encode_base64($req->urldc, '');
}
else {
$self->logger->debug('Not seen as Issuer request, skipping');
......
......@@ -133,7 +133,10 @@ sub checkNotifDuringAuth {
# Cipher id
$req->id( $self->p->HANDLER->tsv->{cipher}->encrypt( $req->id ) );
$self->p->rebuildCookies($req);
if ( not $req->data->{_url} and $req->env->{PATH_INFO} ne '/' ) {
if ( not $req->pdata->{_url}
and not $req->data->{_url}
and $req->env->{PATH_INFO} ne '/' )
{
$req->data->{_url} =
encode_base64( $self->conf->{portal} . $req->env->{PATH_INFO},
'' );
......
This diff is collapsed.
......@@ -31,7 +31,7 @@ SKIP: {
if ($@) {
skip 'Lasso not found', $maintests;
}
my $file = 't/20160530_dwho_dGVzdHJlZg==.json';
my $file = "$main::tmpDir/20160530_dwho_dGVzdHJlZg==.json";
open F, "> $file" or die($!);
print F '[
......@@ -118,11 +118,11 @@ SKIP: {
$file =~ s/json$/done/;
ok( -e $file, 'Notification was deleted' );
$pdata = 'lemonldappdata=' . expectCookie( $res, 'lemonldappdata' );
expectRedirection( $res, 'http://auth.idp.com/saml/singleSignOn' );
expectRedirection( $res, 'http://auth.idp.com/saml' );
ok(
$res = $issuer->_get(
'/saml/singleSignOn',
'/saml',
cookie => "lemonldap=$idpId; $pdata",
accept => 'text/html',
),
......@@ -247,7 +247,7 @@ sub issuer {
issuerDBSAMLActivation => 1,
notification => 1,
notificationStorage => 'File',
notificationStorageOptions => { dirName => 't' },
notificationStorageOptions => { dirName => "$main::tmpDir" },
oldNotifFormat => 0,
samlSPMetaDataOptions => {
'sp.com' => {
......
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