Force remove pdata cookie to avoid loop (#1878)
This commit is contained in:
parent
c928189779
commit
d7cb8bf4b8
|
@ -55,6 +55,20 @@ sub handler {
|
|||
}
|
||||
my $res = $self->Lemonldap::NG::Common::PSGI::Router::handler($req);
|
||||
|
||||
# Avoid permanent loop 'Portal <-> _url' if pdata cookie is not removed
|
||||
my $url64 = encode_base64( $req->userData->{_url}, '' );
|
||||
if ( $url64
|
||||
and !$req->pdata->{keepPdata}
|
||||
and $req->userData->{_session_id}
|
||||
and ( $req->{env}->{HTTP_COOKIE} =~ /$url64/ ) )
|
||||
|
||||
{
|
||||
$self->logger->debug("Force cleaning pdata");
|
||||
$self->logger->warning("pdata cookie domain must be set")
|
||||
unless ( $self->conf->{pdataDomain} );
|
||||
$req->pdata( {} );
|
||||
}
|
||||
|
||||
# Save pdata
|
||||
if ( $sp or %{ $req->pdata } ) {
|
||||
my %v = (
|
||||
|
|
Loading…
Reference in New Issue
Block a user