summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-02-02 19:33:29 +0100
committerlpsolit%gmail.com <>2009-02-02 19:33:29 +0100
commitdc51769c9f7fb84ac2e43112f2d106a4770f5781 (patch)
tree2e33c5042d7608871c661a843c3c991da07693d7 /template/en/default
parent8d70890dc0b7c24b25a344808ac4e63e6a5dd74e (diff)
downloadbugzilla-dc51769c9f7fb84ac2e43112f2d106a4770f5781.tar.gz
bugzilla-dc51769c9f7fb84ac2e43112f2d106a4770f5781.tar.xz
Bug 26257: [SECURITY] Bugzilla should prevent malicious webpages from making bugzilla users submit changes to bugs - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/admin/confirm-action.html.tmpl6
-rw-r--r--template/en/default/bug/edit.html.tmpl1
-rw-r--r--template/en/default/list/edit-multiple.html.tmpl1
3 files changed, 6 insertions, 2 deletions
diff --git a/template/en/default/admin/confirm-action.html.tmpl b/template/en/default/admin/confirm-action.html.tmpl
index da551d0d7..521d2d157 100644
--- a/template/en/default/admin/confirm-action.html.tmpl
+++ b/template/en/default/admin/confirm-action.html.tmpl
@@ -20,6 +20,8 @@
# token_action: the action the token was supposed to serve.
# expected_action: the action the user was going to do.
# script_name: the script generating this warning.
+ # alternate_script: the suggested script to redirect the user to
+ # if he declines submission.
#%]
[% PROCESS "global/field-descs.none.tmpl" %]
@@ -89,8 +91,8 @@
exclude="^(Bugzilla_login|Bugzilla_password)$" %]
<input type="submit" id="confirm" value="Confirm Changes">
</form>
- <p>Or throw away these changes and go back to <a href="[% script_name FILTER html %]">
- [%- script_name FILTER html %]</a>.</p>
+ <p>Or throw away these changes and go back to <a href="[% alternate_script FILTER html %]">
+ [%- alternate_script FILTER html %]</a>.</p>
[% END %]
[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 97a2bd54f..80c5745fc 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -144,6 +144,7 @@
<input type="hidden" name="delta_ts" value="[% bug.delta_ts %]">
<input type="hidden" name="longdesclength" value="[% bug.longdescs.size %]">
<input type="hidden" name="id" value="[% bug.bug_id %]">
+ <input type="hidden" name="token" value="[% issue_hash_token([bug.id, bug.delta_ts]) FILTER html %]">
[% PROCESS section_title %]
<table>
diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl
index 6a62a80dc..46130ef6b 100644
--- a/template/en/default/list/edit-multiple.html.tmpl
+++ b/template/en/default/list/edit-multiple.html.tmpl
@@ -25,6 +25,7 @@
[% dontchange = "--do_not_change--" %]
<input type="hidden" name="dontchange" value="[% dontchange FILTER html %]">
+<input type="hidden" name="token" value="[% token FILTER html %]">
<script type="text/javascript">
var numelements = document.forms.changeform.elements.length;