From 55b33108da4a79bcd88c8bd31f111b7438d69b56 Mon Sep 17 00:00:00 2001 From: Oleksandr Duts Date: Tue, 22 Feb 2022 19:15:53 +0200 Subject: [PATCH] TT#146250 UI recoverwebpassword - redirect to 443 * The succesful password recovering redirects to https:/// which is translated to /#/login on CSC page. Change-Id: If4e7ae510396e3852319c7e5c9d4915fdd214e95 --- lib/NGCP/Panel/Controller/Subscriber.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/NGCP/Panel/Controller/Subscriber.pm b/lib/NGCP/Panel/Controller/Subscriber.pm index e39d2cde37..d4032e3a5c 100644 --- a/lib/NGCP/Panel/Controller/Subscriber.pm +++ b/lib/NGCP/Panel/Controller/Subscriber.pm @@ -602,6 +602,9 @@ sub recover_webpassword :Chained('/') :PathPart('recoverwebpassword') :Args(0) { fields => {}, back_uri => $c->req->uri, ); + + my $subscriber_root_url = "https://" . $c->req->uri->host . "/"; + if($posted && $form->validated) { my $subscriber; try { @@ -640,7 +643,7 @@ sub recover_webpassword :Chained('/') :PathPart('recoverwebpassword') :Args(0) { desc => $c->loc('Web password successfully recovered, please re-login.'), ); $c->flash(username => $subscriber->username . '@' . $subscriber->domain->domain); - $c->res->redirect($c->uri_for('/login/subscriber')); + $c->res->redirect($subscriber_root_url); return; } @@ -649,7 +652,7 @@ sub recover_webpassword :Chained('/') :PathPart('recoverwebpassword') :Args(0) { form => $form, edit_flag => 1, template => 'subscriber/recoverpassword.tt', - close_target => $c->uri_for('/login/subscriber'), + close_target => $subscriber_root_url, ); }