diff options
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; } } |