Clear url pdata on CDA redirection

Fixes #1650
This commit is contained in:
Maxime Besson 2019-03-19 19:15:47 +01:00
parent 73c8a1a8d7
commit 3575e0ef23
2 changed files with 10 additions and 0 deletions

View File

@ -47,6 +47,10 @@ sub changeUrldc {
$self->p->updateSession( $req, $cdaInfos, $cdaSession->id );
# We are about to redirect the user to the CDA application,
# dismiss any previously stored redirections (#1650)
delete $req->{pdata}->{_url};
$req->{urldc} .=
( $urldc =~ /\?/ ? '&' : '?' )
. $self->{conf}->{cookieName} . "cda="

View File

@ -51,6 +51,12 @@ count(1);
my ($query) =
expectRedirection( $res, qr#^http://test.example.org/\?(lemonldapcda=.*)$# );
# Bug #1650 made the portal store an _url in pdata at this step
my $cookies = getCookies($res);
ok( !defined( $cookies->{lemonldappdata} ), " Make sure no pdata is returned" );
count(1);
# Handler part
use_ok('Lemonldap::NG::Handler::Server');
use_ok('Lemonldap::NG::Common::PSGI::Cli::Lib');