Restore _httpSession (#1746)

This commit is contained in:
Christophe Maudoux 2019-05-11 19:04:18 +02:00
parent 8f140bd235
commit aeead582d8

View File

@ -55,6 +55,7 @@ sub init {
sub run {
my ( $self, $req ) = @_;
my $savedHttpSession = $req->{sessionInfo}->{_httpSession} //= '';
my $spoofId = $req->param('spoofId') || $req->{user};
$self->logger->debug("No impersonation required") if ( $spoofId eq $req->{user} );
my $statut = PE_OK;
@ -139,6 +140,8 @@ sub run {
$self->p->updateSession( $req, $spoofSession );
$req->steps( [ $self->p->validSession, @{ $self->p->endAuth } ] );
# Restore _httpSession for double Cookies
$req->{sessionInfo}->{_httpSession} = $savedHttpSession if $savedHttpSession;
return $statut;
}