From 94d888356469f2d920835f9c6d4eba944e429f62 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 25 Sep 2017 14:14:31 -0400 Subject: Bug 1401463 - In bugzilla "you must reset password" state, all bug pages are force-redirected to password reset page, which loses "to-do" information that I have encoded as open tabs viewing particular bug pages --- Bugzilla.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Bugzilla.pm') diff --git a/Bugzilla.pm b/Bugzilla.pm index 1f01979ea..9bce73010 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -396,7 +396,12 @@ sub login { # (tokens handles the 'forgot password' process) # otherwise redirect user to the reset-password page. if ( $ENV{SCRIPT_NAME} !~ m#/(?:reset_password|token)\.cgi$# ) { - print $cgi->redirect('reset_password.cgi'); + my $self_url = trim($cgi->self_url); + my $sig_type = 'prev_url:' . $authenticated_user->id; + my $self_url_sig = issue_hash_sig($sig_type, $self_url); + my $redir_url = URI->new( correct_urlbase() . "reset_password.cgi" ); + $redir_url->query_form(prev_url => $self_url, prev_url_sig => $self_url_sig); + print $cgi->redirect($redir_url); exit; } } -- cgit v1.2.3-24-g4f1b