diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-09-25 20:14:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-25 20:14:31 +0200 |
commit | 94d888356469f2d920835f9c6d4eba944e429f62 (patch) | |
tree | a4a123f21ae538261bf53d3593e12fb8d1a3d26b /Bugzilla.pm | |
parent | d827379894e2a5415cdbbb6b30aad0448ba82fb0 (diff) | |
download | bugzilla-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.pm | 7 |
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; } } |