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
7fca098a
Commit
7fca098a
authored
Oct 16, 2013
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 924932: (CVE-2013-1743) [SECURITY] Field values are not escaped correctly in tabular reports
r=dkl a=glob
parent
953d690a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
report-table.html.tmpl
template/en/default/reports/report-table.html.tmpl
+24
-14
No files found.
template/en/default/reports/report-table.html.tmpl
View file @
7fca098a
...
...
@@ -30,32 +30,42 @@
[% END %]
<script type="text/javascript">
function bz_encode (str, decode) {
// First decode HTML entities, if requested.
if (decode)
str = str.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"')
.replace(/ /g, " ").replace(/&/g, "&").replace(/\s+$/,"");
// encodeURIComponent() doesn't escape single quotes.
return encodeURIComponent(str).replace(/'/g, escape);
};
YAHOO.util.Event.addListener(window, "load", function() {
this.Linkify = function(elLiner, oRecord, oColumn, oData) {
if (oData == 0)
elLiner.innerHTML = ".";
else if (oRecord.getData("row_title") == "Total")
elLiner.innerHTML =
"<a href='[% urlbase %]&[% col_field FILTER js %]="
+
oColumn.field + "[% '&' _ row_vals IF row_vals %]'>"
+
oData + "</a>"
;
elLiner.innerHTML =
'<a href="[% urlbase FILTER js %]&[% col_field FILTER uri FILTER js %]='
+
bz_encode(oColumn.field)
+
'[% "&" _ row_vals IF row_vals %]">' + oData + '</a>'
;
else
elLiner.innerHTML =
"<a href='[% urlbase %]&[% row_field FILTER js %]="
+
oRecord.getData("row_title").replace(/\s+$/,""
)
+
"&[% col_field FILTER js %]=" + oColumn.field
+
"'>" + oData + "</a>"
;
elLiner.innerHTML =
'<a href="[% urlbase FILTER js %]&[% row_field FILTER uri FILTER js %]='
+
bz_encode(oRecord.getData("row_title"), 1
)
+
'&[% col_field FILTER uri FILTER js %]='
+
bz_encode(oColumn.field) + '">' + oData + '</a>'
;
};
this.LinkifyTotal = function(elLiner, oRecord, oColumn, oData) {
if (oData == 0)
elLiner.innerHTML = ".";
else if (oRecord.getData("row_title") == "Total")
elLiner.innerHTML =
"<a href='[% urlbase %][% '&'
_ row_vals IF row_vals %]
[%~
'&' _ col_vals IF col_vals %]'>"
+ oData +
"</a>"
;
elLiner.innerHTML =
'<a href="[% urlbase FILTER js %][% "&"
_ row_vals IF row_vals %]
[%~
"&" _ col_vals IF col_vals %]">'
+ oData +
'</a>'
;
else
elLiner.innerHTML =
"<a href='[% urlbase %]&[% row_field FILTER js %]="
+
oRecord.getData("row_title").replace(/\s+$/,""
)
+
"[% '&' _ col_vals IF col_vals %]'>" + oData + "</a>"
;
elLiner.innerHTML =
'<a href="[% urlbase FILTER js %]&[% row_field FILTER uri FILTER js %]='
+
bz_encode(oRecord.getData("row_title"), 1
)
+
'[% "&" _ col_vals IF col_vals %]">' + oData + '</a>'
;
YAHOO.util.Dom.addClass(elLiner.parentNode, "ttotal");
};
...
...
@@ -147,7 +157,7 @@ YAHOO.util.Event.addListener(window, "load", function() {
[% col_idx = 0 %]
[% row_idx = 0 %]
[% grand_total = 0 %]
<div id="tabular_report_container_[% tbl FILTER
js
%]">
<div id="tabular_report_container_[% tbl FILTER
html
%]">
<table id="tabular_report" border="1">
[% IF col_field %]
<thead>
...
...
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