summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-02-14 22:51:03 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2011-02-14 22:51:03 +0100
commit1bc66daa8b5b8c3a2649e900bc4cc1801dfc3b6f (patch)
tree21087f7e4cfd454ff9af60c70d40d68d2a7bea22 /Bugzilla/User.pm
parente9346b996d8a49f9438cf567ea9eb356b31f206a (diff)
downloadbugzilla-1bc66daa8b5b8c3a2649e900bc4cc1801dfc3b6f.tar.gz
bugzilla-1bc66daa8b5b8c3a2649e900bc4cc1801dfc3b6f.tar.xz
Bug 480044: Use dashes instead of colons to separate bug IDs in the BUGLIST cookie, because colons are HTML-escaped, making the cookie bigger than the 4k limit
r=mkanat a=LpSolit
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 0b639ee0d..f23873991 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -441,7 +441,8 @@ sub recent_search_for {
# and the selected bug is in the list, then return the cookie as a fake
# Search::Recent object.
if (my $list = $cgi->cookie('BUGLIST')) {
- my @bug_ids = split(':', $list);
+ # Also split on colons, which was used as a separator in old cookies.
+ my @bug_ids = split(/[:-]/, $list);
if (grep { $_ == $bug->id } @bug_ids) {
my $search = Bugzilla::Search::Recent->new_from_cookie(\@bug_ids);
return $search;
@@ -512,7 +513,7 @@ sub save_last_search {
# they may still want to navigate through the search they made while
# logged out.
else {
- my $bug_list = join(":", @$bug_ids);
+ my $bug_list = join('-', @$bug_ids);
if (length($bug_list) < 4000) {
$cgi->send_cookie(-name => 'BUGLIST',
-value => $bug_list,