Allow double sessions for double cookies (#1775)

This commit is contained in:
Christophe Maudoux 2019-05-27 22:41:51 +02:00
parent b8d242464d
commit dece7d8aa0

View File

@ -17,7 +17,7 @@ sub run {
my ( $self, $req ) = @_; my ( $self, $req ) = @_;
my $deleted = []; my $deleted = [];
my $otherSessions = []; my $otherSessions = [];
my $httpSessionId = '';
my $moduleOptions = $self->conf->{globalStorageOptions} || {}; my $moduleOptions = $self->conf->{globalStorageOptions} || {};
$moduleOptions->{backend} = $self->conf->{globalStorage}; $moduleOptions->{backend} = $self->conf->{globalStorage};
@ -26,8 +26,17 @@ sub run {
$self->conf->{whatToTrace}, $self->conf->{whatToTrace},
$req->{sessionInfo}->{ $self->conf->{whatToTrace} } $req->{sessionInfo}->{ $self->conf->{whatToTrace} }
); );
if ( $self->conf->{securedCookie} == 2 ){
$self->logger->debug("Looking for double sessions...");
foreach my $id ( keys %$sessions ) {
$httpSessionId = $sessions->{$id}->{_session_id} if $sessions->{$id}->{_httpSessionType};
}
}
foreach my $id ( keys %$sessions ) { foreach my $id ( keys %$sessions ) {
next if ( $req->id eq $id ); next if ( $req->id eq $id );
next if ( $httpSessionId and $id eq $httpSessionId );
my $session = $self->p->getApacheSession($id) or next; my $session = $self->p->getApacheSession($id) or next;
if ( if (
$self->conf->{singleSession} $self->conf->{singleSession}