From 29021b187f042f023584dd3986c086ca68bef0a2 Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" <> Date: Fri, 25 Apr 2003 03:49:27 +0000 Subject: Bug 192677: Add new test to flag failure-to-filter situations in the templates, and correct the XSS holes that were discovered as a result of it. Patch by Gervase Markham r= myk, bbaetz, justdave a= justdave --- template/en/default/global/choose-product.html.tmpl | 2 +- template/en/default/global/code-error.html.tmpl | 2 +- template/en/default/global/hidden-fields.html.tmpl | 4 ++-- template/en/default/global/message.html.tmpl | 2 +- template/en/default/global/user-error.html.tmpl | 9 +++++++-- 5 files changed, 12 insertions(+), 7 deletions(-) (limited to 'template/en/default/global') diff --git a/template/en/default/global/choose-product.html.tmpl b/template/en/default/global/choose-product.html.tmpl index de0ca0be7..e79f7820d 100644 --- a/template/en/default/global/choose-product.html.tmpl +++ b/template/en/default/global/choose-product.html.tmpl @@ -41,7 +41,7 @@ + [% IF format %]&format=[% format FILTER url_quote %][% END %]"> [% p FILTER html %]: diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index b35bbb064..92836f4db 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -86,7 +86,7 @@ [% ELSIF error == "field_type_mismatch" %] Cannot seem to handle [% field %] - and [% type %] together. + and [% type FILTER html %] together. [% ELSIF error == "gd_not_installed" %] Charts will not work without the GD Perl module being installed. diff --git a/template/en/default/global/hidden-fields.html.tmpl b/template/en/default/global/hidden-fields.html.tmpl index f968fab20..a824c3489 100644 --- a/template/en/default/global/hidden-fields.html.tmpl +++ b/template/en/default/global/hidden-fields.html.tmpl @@ -32,11 +32,11 @@ [% NEXT IF exclude && field.key.search(exclude) %] [% IF mform.${field.key}.size > 1 %] [% FOREACH mvalue = mform.${field.key} %] - [% END %] [% ELSE %] - [% END %] [% END %] diff --git a/template/en/default/global/message.html.tmpl b/template/en/default/global/message.html.tmpl index f6cb321c6..58cd56908 100644 --- a/template/en/default/global/message.html.tmpl +++ b/template/en/default/global/message.html.tmpl @@ -34,7 +34,7 @@ [%# Display a URL if the calling script or message block has included one. %] [% IF url && link %]

- [% link %] + [% link FILTER html %]

[% END %] diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index fe1d9e223..934c0511f 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -235,7 +235,7 @@ [% ELSIF error == "illegal_date" %] [% title = "Your Query Makes No Sense" %] - '[% date %]' is not a legal date. + '[% date FILTER html %]' is not a legal date. [% ELSIF error == "illegal_email_address" %] [% title = "Invalid Email Address" %] @@ -290,6 +290,11 @@ in your browser. To help us fix this limitation, add your comments to bug 70907. + [% ELSIF error == "invalid_changedsince" %] + [% title = "Invalid 'Changed Since'" %] + The 'changed since' value, '[% changedsince FILTER html %]', must be an + integer >= 0. + [% ELSIF error == "invalid_content_type" %] [% title = "Invalid Content-Type" %] The content type [% contenttype FILTER html %] is invalid. @@ -355,7 +360,7 @@ [% ELSIF error == "missing_email_type" %] [% title = "Your Query Makes No Sense" %] You must specify one or more fields in which to search for - [% email %]. + [% email FILTER html %]. [% ELSIF error == "missing_query" %] [% title = "Missing Query" %] -- cgit v1.2.3-24-g4f1b