Better fix (#2061)
This commit is contained in:
parent
fd2a9ce226
commit
32d7f46b1a
|
@ -140,8 +140,8 @@ sub controlUrl {
|
||||||
|
|
||||||
$req->env->{urldc} = $req->{urldc};
|
$req->env->{urldc} = $req->{urldc};
|
||||||
$req->env->{_url} = $req->{_url};
|
$req->env->{_url} = $req->{_url};
|
||||||
$req->data->{_url} = $url;
|
$req->data->{_url} = encode_base64($req->{urldc},''); # Avoid \n or \n
|
||||||
$req->pdata->{_url} = $url;
|
$req->pdata->{_url} = encode_base64($req->{urldc},''); # Same here
|
||||||
}
|
}
|
||||||
PE_OK;
|
PE_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,13 +56,12 @@ sub handler {
|
||||||
my $res = $self->Lemonldap::NG::Common::PSGI::Router::handler($req);
|
my $res = $self->Lemonldap::NG::Common::PSGI::Router::handler($req);
|
||||||
|
|
||||||
# Avoid permanent loop 'Portal <-> _url' if pdata cookie is not removed
|
# Avoid permanent loop 'Portal <-> _url' if pdata cookie is not removed
|
||||||
my $url64 = encode_base64( $req->userData->{_url}, '' )
|
if ( $req->userData->{_url}
|
||||||
if $req->userData->{_url};
|
|
||||||
if ( $url64
|
|
||||||
and !$req->pdata->{keepPdata}
|
and !$req->pdata->{keepPdata}
|
||||||
and $req->userData->{_session_id}
|
and $req->userData->{_session_id}
|
||||||
and $req->{env}->{HTTP_COOKIE}
|
and $req->{env}->{HTTP_COOKIE}
|
||||||
and $req->{env}->{HTTP_COOKIE} =~ /$url64/ )
|
and $req->{env}->{HTTP_COOKIE} eq
|
||||||
|
encode_base64( $req->userData->{_url}, '' ) )
|
||||||
{
|
{
|
||||||
$self->logger->info("Force cleaning pdata");
|
$self->logger->info("Force cleaning pdata");
|
||||||
$self->logger->warn("pdata cookie domain must be set")
|
$self->logger->warn("pdata cookie domain must be set")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user