Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
4d1c399f
Commit
4d1c399f
authored
Dec 11, 2014
by
Matt Selsky
Committed by
Gervase Markham
Dec 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1102842 - remove and/or unwhitelist unsafe filters. r=gerv, a=simon.
parent
7b8a5d16
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
43 deletions
+37
-43
Template.pm
Bugzilla/Template.pm
+0
-29
004template.t
t/004template.t
+0
-3
008filter.t
t/008filter.t
+3
-3
prefs.html.tmpl
template/en/default/account/prefs/prefs.html.tmpl
+1
-1
list.html.tmpl
template/en/default/attachment/list.html.tmpl
+9
-1
show-multiple.html.tmpl
template/en/default/attachment/show-multiple.html.tmpl
+9
-1
dependency-tree.html.tmpl
template/en/default/bug/dependency-tree.html.tmpl
+5
-1
change-columns.html.tmpl
template/en/default/list/change-columns.html.tmpl
+1
-1
edit-multiple.html.tmpl
template/en/default/list/edit-multiple.html.tmpl
+9
-3
No files found.
Bugzilla/Template.pm
View file @
4d1c399f
...
...
@@ -759,35 +759,6 @@ sub create {
# built-in filter, please also add a stub filter to t/004template.t.
FILTERS
=>
{
# Render text in required style.
inactive
=>
[
sub
{
my
(
$context
,
$isinactive
)
=
@_
;
return
sub
{
return
$isinactive
?
'<span class="bz_inactive">'
.
$_
[
0
]
.
'</span>'
:
$_
[
0
];
}
},
1
],
closed
=>
[
sub
{
my
(
$context
,
$isclosed
)
=
@_
;
return
sub
{
return
$isclosed
?
'<span class="bz_closed">'
.
$_
[
0
]
.
'</span>'
:
$_
[
0
];
}
},
1
],
obsolete
=>
[
sub
{
my
(
$context
,
$isobsolete
)
=
@_
;
return
sub
{
return
$isobsolete
?
'<span class="bz_obsolete">'
.
$_
[
0
]
.
'</span>'
:
$_
[
0
];
}
},
1
],
# Returns the text with backslashes, single/double quotes,
# and newlines/carriage returns escaped for use in JS strings.
js
=>
sub
{
...
...
t/004template.t
View file @
4d1c399f
...
...
@@ -74,9 +74,6 @@ foreach my $include_path (@include_paths) {
no_break => sub { return $_; } ,
js => sub { return $_ } ,
base64 => sub { return $_ } ,
inactive => [ sub { return sub { return $_; } }, 1] ,
closed => [ sub { return sub { return $_; } }, 1] ,
obsolete => [ sub { return sub { return $_; } }, 1] ,
url_quote => sub { return $_ } ,
css_class_quote => sub { return $_ } ,
xml => sub { return $_ } ,
...
...
t/008filter.t
View file @
4d1c399f
...
...
@@ -210,9 +210,9 @@ sub directive_ok {
# Note: If a single directive prints two things, and only one is
# filtered, we may not catch that case.
return 1 if $directive =~ /FILTER\ (html|csv|js|base64|css_class_quote|ics|
quoteUrls|time|uri|xml|
lower|
html_light|
obsolete|inactive|closed|unitconvert
|
txt|html_linebreak|markdown|
none|null)\b/x;
quoteUrls|time|uri|xml|html_light|
unitconvert|txt|html_linebreak|markdown
|
none|null)\b/x;
return 0;
}
...
...
template/en/default/account/prefs/prefs.html.tmpl
View file @
4d1c399f
...
...
@@ -68,7 +68,7 @@
[% IF changes_saved %]
<div id="message">
The changes to your [% current_tab.label FILTER lower %] have been saved.
The changes to your [% current_tab.label FILTER lower
FILTER html
%] have been saved.
[% IF email_changes_saved %]
<p>
...
...
template/en/default/attachment/list.html.tmpl
View file @
4d1c399f
...
...
@@ -70,7 +70,15 @@ function toggle_display(link) {
<a href="attachment.cgi?id=[% attachment.id %]"
title="View the content of the attachment">
[% END %]
<b>[% attachment.description FILTER html FILTER obsolete(attachment.isobsolete) %]</b>
<b>
[% IF attachment.isobsolete %]
<span class="bz_obsolete">
[% END %]
[% attachment.description FILTER html %]
[% IF attachment.isobsolete %]
</span>
[% END %]
</b>
[% "</a>" IF attachment.datasize %]
<span class="bz_attach_extra_info">
...
...
template/en/default/attachment/show-multiple.html.tmpl
View file @
4d1c399f
...
...
@@ -34,7 +34,15 @@
<th colspan="6" class="bz_attach_footer">Attachment #[% a.id %]</th>
</tr>
<tr>
<td>[% a.description FILTER html FILTER obsolete(a.isobsolete) %]</td>
<td>
[% IF a.isobsolete %]
<span class="bz_obsolete">
[% END %]
[% a.description FILTER html %]
[% IF a.isobsolete %]
</span>
[% END %]
</td>
<td>
[% IF a.ispatch %]
...
...
template/en/default/bug/dependency-tree.html.tmpl
View file @
4d1c399f
...
...
@@ -136,7 +136,9 @@
[% BLOCK buglink %]
[% isclosed = !bug.isopened %]
[% FILTER closed(isclosed) -%]
[% IF isclosed %]
<span class="bz_closed">
[% END %]
<a title="[% INCLUDE buginfo bug=bug %]"
href="show_bug.cgi?id=[% bugid %]">
<b>[%- bugid %]:</b>
...
...
@@ -148,6 +150,8 @@
<img src="skins/standard/dependency-tree/tree.png"
title="See dependency tree for [% terms.bug %] [%+ bugid FILTER html %]">
</a>
[% IF isclosed %]
</span>
[% END %]
[% END %]
...
...
template/en/default/list/change-columns.html.tmpl
View file @
4d1c399f
...
...
@@ -31,7 +31,7 @@
[% FOREACH column = columns.keys %]
[% NEXT IF collist.contains(column) %]
[%# We lowecase the keys so that the sort happens case-insensitively. %]
[% SET column_desc = field_descs.$column || column FILTER lower %]
[% SET column_desc = field_descs.$column || column FILTER lower
FILTER html
%]
[% available_columns.$column_desc = column %]
[% END %]
...
...
template/en/default/list/edit-multiple.html.tmpl
View file @
4d1c399f
...
...
@@ -371,7 +371,13 @@
<td>
[% SET inactive = !group.is_active %]
[% group.description FILTER html_light FILTER inactive(inactive) %]
[% IF inactive %]
<span class="bz_inactive">
[% END %]
[% group.description FILTER html_light %]
[% IF inactive %]
</span>
[% END %]
</td>
</tr>
...
...
@@ -380,8 +386,8 @@
</table>
[% IF foundinactive %]
<p class="bz_info">(Note: [% terms.Bugs %] may not be added to
[% FILTER inactive %]
inactive
groups
[% END %]
, only removed.)</p>
<p class="bz_info">(Note: [% terms.Bugs %] may not be added to inactive
groups, only removed.)</p>
[% END %]
[% END %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment