Keep original PATH_INFO during notification process (Fixes: #1852)

environments/ppa-mbqj77/deployments/784^2
Xavier Guimard 6 years ago
parent 966eef33ee
commit 3c6a301785
  1. 2
      lemonldap-ng-portal/MANIFEST
  2. 6
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm

@ -447,6 +447,7 @@ t/30-Auth-SAML-with-choice.t
t/30-CDC.t
t/30-SAML-Head-to-Tail-POST.t
t/30-SAML-POST-Logout-when-expired.t
t/30-SAML-POST-with-Notification.t
t/30-SAML-ReAuth-with-choice.t
t/30-SAML-ReAuth.t
t/30-SAML-SP-rule.t
@ -536,6 +537,7 @@ t/63-History.t
t/64-StayConnected.t
t/65-AutoSignin.t
t/66-CDA-already-auth.t
t/66-CDA-PSGI-Try.t
t/66-CDA-with-REST.t
t/66-CDA-with-SOAP.t
t/66-CDA.t

@ -13,6 +13,7 @@ package Lemonldap::NG::Portal::Plugins::Notifications;
use strict;
use Mouse;
use MIME::Base64;
use Lemonldap::NG::Portal::Main::Constants qw(
PE_ERROR
PE_NOTIFICATION
@ -121,6 +122,11 @@ sub checkNotifDuringAuth {
# Cipher id
$req->id( $self->p->HANDLER->tsv->{cipher}->encrypt( $req->id ) );
$self->p->rebuildCookies($req);
if ( not $req->data->{_url} and $req->env->{PATH_INFO} ne '/' ) {
$req->data->{_url} =
encode_base64( $self->conf->{portal} . $req->env->{PATH_INFO},
'' );
}
# Restore and cipher cookies
return PE_NOTIFICATION;

Loading…
Cancel
Save