]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 875217 - SecurityError in Javascript on buglist.cgi
authorSimon Green <sgreen@redhat.com>
Wed, 4 Sep 2013 00:41:14 +0000 (10:41 +1000)
committerSimon Green <sgreen@redhat.com>
Wed, 4 Sep 2013 00:41:14 +0000 (10:41 +1000)
r=glob, a=glob

template/en/default/list/list.html.tmpl

index 6e1755fed1ccccc3f8128c37371c6506d3cc9ddf..ec453d0b7eabd40da2b2d5bbf18679ded99fe07a 100644 (file)
 [% qorder = order FILTER uri IF order %]
 
 [% javascript =  BLOCK %]
-  [% new_url = cgi.self_url %]
   [% IF quicksearch %]
-    [% new_url = BLOCK ~%]
-      buglist.cgi?quicksearch=[% quicksearch FILTER uri %]
+    [% new_param = BLOCK ~%]
+      quicksearch=[% quicksearch FILTER uri %]
       [%~ IF cgi.param('list_id') ~%]
         &list_id=[% cgi.param('list_id') FILTER uri %]
       [%~ END %]
     [% END %]
   [% ELSIF cgi.param('token') != '' %]
-    [% new_url = 'buglist.cgi?'
-                 _ cgi.canonicalise_query('token', 'cmdtype', 'remtype') %]
+    [% new_param = cgi.canonicalise_query('token', 'cmdtype', 'remtype') %]
+  [% ELSE %]
+    [% new_param = cgi.canonicalise_query %]
   [% END %]
 
   if (history && history.replaceState) {
     history.replaceState(null, "[% unfiltered_title FILTER js %]",
-                         "[% new_url FILTER js %]");
+                         "buglist.cgi?[% new_param FILTER js %]");
     document.title = "[% unfiltered_title FILTER js %]";
   }
   [% javascript FILTER none %]