From b1ef63e5bfc0d3995245b42154686db1400b2c22 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 15 Oct 2006 03:26:50 +0000 Subject: Bug 206037: [SECURITY] Fix escaping/quoting in edit*.cgi scripts - Patch by Frédéric Buclin r=justdave a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/admin/users/edit.html.tmpl | 2 +- template/en/default/admin/users/list.html.tmpl | 46 +++++++++++++++++--------- 2 files changed, 31 insertions(+), 17 deletions(-) (limited to 'template/en/default/admin/users') diff --git a/template/en/default/admin/users/edit.html.tmpl b/template/en/default/admin/users/edit.html.tmpl index f92492472..c35bb691f 100644 --- a/template/en/default/admin/users/edit.html.tmpl +++ b/template/en/default/admin/users/edit.html.tmpl @@ -89,7 +89,7 @@ diff --git a/template/en/default/admin/users/list.html.tmpl b/template/en/default/admin/users/list.html.tmpl index 4b483e33d..41c5016f8 100644 --- a/template/en/default/admin/users/list.html.tmpl +++ b/template/en/default/admin/users/list.html.tmpl @@ -38,11 +38,9 @@ heading => 'Edit user...' contentlink => 'editusers.cgi?action=edit&userid=%%userid%%' _ listselectionurlparams - allow_html_content => 1 } {name => 'realname' heading => 'Real name' - allow_html_content => 1 } {heading => 'User Account Log' content => 'View' @@ -64,23 +62,38 @@ %] [% END %] +[%# Disabled users are crossed out. Missing realnames are noticed in red. %] +[% overrides.login_name = [] %] +[% overrides.realname = [] %] + [% FOREACH thisuser = users %] - [%# We FILTER html here because we need admin/table.html.tmpl to accept HTML - # for styling, so we cannot let admin/table.html.tmpl do the FILTER. - #%] - [% thisuser.login_name = BLOCK %] - [% thisuser.login_name FILTER html %] - [% END %] - [% IF thisuser.realname %] - [% thisuser.realname = BLOCK %] - [% thisuser.realname FILTER html %] - [% END %] - [% ELSE %] - [% SET thisuser.realname = 'missing' %] + [% IF !thisuser.realname %] + [%# We cannot pass one class now and one class later. %] + [% SET classes = (thisuser.disabledtext ? "bz_inactive missing" : "missing") %] + [% overrides.realname.push({ + match_value => "$thisuser.login_name" + match_field => 'login_name' + content => "missing" + override_content => 1 + class => "$classes" + override_class => 1 }) + %] [% END %] + [% IF thisuser.disabledtext %] - [% thisuser.login_name = "$thisuser.login_name" %] - [% thisuser.realname = "$thisuser.realname" %] + [% overrides.login_name.push({ + match_value => "$thisuser.login_name" + match_field => 'login_name' + class => "bz_inactive" + override_class => 1 }) + %] + + [% overrides.realname.push({ + match_value => "$thisuser.login_name" + match_field => 'login_name' + class => "bz_inactive" + override_class => 1 }) + %] [% END %] [% END %] @@ -89,6 +102,7 @@ [% PROCESS admin/table.html.tmpl columns = columns data = users + overrides = overrides %]

-- cgit v1.2.3-24-g4f1b