From 88f75c42ed625a2fc0bf46b292a8d471429e1716 Mon Sep 17 00:00:00 2001 From: Xavier Date: Fri, 5 Jul 2019 06:43:11 +0200 Subject: [PATCH] Set pdata domain also when removing cookie (#1829) --- .../lib/Lemonldap/NG/Portal/Main/Run.pm | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm index b5bf0d949..3660ebe34 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm @@ -61,21 +61,14 @@ sub handler { name => $self->conf->{cookieName} . 'pdata', ( %{ $req->pdata } - ? ( ( - $self->conf->{pdataDomain} - ? ( - value => uri_escape( JSON::to_json( $req->pdata ) ), - domain => $self->conf->{pdataDomain}, - ) - : ( value => uri_escape( JSON::to_json( $req->pdata ) ), - ) - ) - ) - : ( - value => '', - expires => 'Wed, 21 Oct 2015 00:00:00 GMT' - ) - ) + ? ( value => uri_escape( JSON::to_json( $req->pdata ) ) ) + : ( value => '', expires => 'Wed, 21 Oct 2015 00:00:00 GMT' ) + ), + ( + $self->conf->{pdataDomain} + ? ( domain => $self->conf->{pdataDomain}, ) + : () + ), ); push @{ $res->[1] }, 'Set-Cookie', $self->cookie(%v); }