summaryrefslogtreecommitdiffstats
path: root/Bugzilla/CGI.pm
diff options
context:
space:
mode:
authorReed Loden <reed@reedloden.com>2012-08-31 07:48:17 +0200
committerReed Loden <reed@reedloden.com>2012-08-31 07:48:17 +0200
commita456ec46452abaaaa5369c02886c7d5b03e592f3 (patch)
tree52e153ff5cf239589e5664b02c1ee1a794e82354 /Bugzilla/CGI.pm
parentcc747ce58fb842897b45a67af40e178879cf384d (diff)
parent8714b6e62007c8de816a0b7f4e053e25c6de31c8 (diff)
downloadbugzilla-a456ec46452abaaaa5369c02886c7d5b03e592f3.tar.gz
bugzilla-a456ec46452abaaaa5369c02886c7d5b03e592f3.tar.xz
Merge from bugzilla/4.2
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r--Bugzilla/CGI.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index ce89a9e6d..7f98c1653 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -180,6 +180,16 @@ sub clean_search_url {
# Delete leftovers from the login form
$self->delete('Bugzilla_remember', 'GoAheadAndLogIn');
+ # Delete the token if we're not performing an action which needs it
+ unless ((defined $self->param('remtype')
+ && ($self->param('remtype') eq 'asdefault'
+ || $self->param('remtype') eq 'asnamed'))
+ || (defined $self->param('remaction')
+ && $self->param('remaction') eq 'forget'))
+ {
+ $self->delete("token");
+ }
+
foreach my $num (1,2,3) {
# If there's no value in the email field, delete the related fields.
if (!$self->param("email$num")) {
@@ -368,7 +378,7 @@ sub param {
sub _fix_utf8 {
my $input = shift;
# The is_utf8 is here in case CGI gets smart about utf8 someday.
- utf8::decode($input) if defined $input && !utf8::is_utf8($input);
+ utf8::decode($input) if defined $input && !ref $input && !utf8::is_utf8($input);
return $input;
}