summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-09-25 20:14:31 +0200
committerGitHub <noreply@github.com>2017-09-25 20:14:31 +0200
commit94d888356469f2d920835f9c6d4eba944e429f62 (patch)
treea4a123f21ae538261bf53d3593e12fb8d1a3d26b /Bugzilla.pm
parentd827379894e2a5415cdbbb6b30aad0448ba82fb0 (diff)
downloadbugzilla-94d888356469f2d920835f9c6d4eba944e429f62.tar.gz
bugzilla-94d888356469f2d920835f9c6d4eba944e429f62.tar.xz
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
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm7
1 files changed, 6 insertions, 1 deletions
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;
}
}