diff options
author | Byron Jones <bjones@mozilla.com> | 2012-07-17 09:52:13 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2012-07-17 09:52:13 +0200 |
commit | 4608e86fd168d956cf1a3ce28843344327fbb166 (patch) | |
tree | 35690ac2f31b6adff839a96dde21b789feb6dd21 | |
parent | 625d7798e662fcbd9a642e8e522824fe67a60c6e (diff) | |
download | bugzilla-4608e86fd168d956cf1a3ce28843344327fbb166.tar.gz bugzilla-4608e86fd168d956cf1a3ce28843344327fbb166.tar.xz |
Bug 772953: buglist urls should not contain a token
-rwxr-xr-x | buglist.cgi | 3 | ||||
-rw-r--r-- | template/en/default/search/search-advanced.html.tmpl | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/buglist.cgi b/buglist.cgi index 0e73378a8..2891b5dea 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -1117,7 +1117,8 @@ else { # Set 'urlquerypart' once the buglist ID is known. $vars->{'urlquerypart'} = $params->canonicalise_query('order', 'cmdtype', - 'query_based_on'); + 'query_based_on', + 'token'); if ($format->{'extension'} eq "csv") { # We set CSV files to be downloaded, as they are designed for importing diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl index ef7fa769a..2236bf5d2 100644 --- a/template/en/default/search/search-advanced.html.tmpl +++ b/template/en/default/search/search-advanced.html.tmpl @@ -32,6 +32,13 @@ [% js_data = BLOCK %] var queryform = "queryform" + +function remove_token() { + var asDefault = document.getElementById('remasdefault'); + if (queryform.token && asDefault && !asDefault.checked) { + queryform.token.value = ''; + } +} [% END %] [% PROCESS global/header.html.tmpl @@ -53,7 +60,8 @@ var queryform = "queryform" <p id="search_help">Hover your mouse over each field label to get help for that field.</p> -<form method="post" action="buglist.cgi" name="queryform" id="queryform"> +<form method="post" action="buglist.cgi" name="queryform" id="queryform" + onsubmit="remove_token()"> [% PROCESS search/form.html.tmpl %] |