Skip to content

Commit a81fad7

Browse files
thc202anaaroch
authored andcommitted
fix: Fixing most of the eslint error messages
Signed-off-by: Ana Rocha <[email protected]>
2 parents 326c314 + 86e64ab commit a81fad7

File tree

7 files changed

+75
-53
lines changed

7 files changed

+75
-53
lines changed

site/content/docs/alerts/10004.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: "Tech Detected - Apache HTTP Server"
3+
alertid: 10004
4+
alertindex: 1000400
5+
alerttype: "Tool"
6+
alertcount: 1
7+
status: release
8+
type: alert
9+
risk: Informational
10+
solution: ""
11+
references:
12+
- https://httpd.apache.org
13+
other: "The following CPE is associated with the identified tech: cpe:2.3:a:apache:http_server:*:*:*:*:*:*:*:* The following version(s) is/are associated with the identified tech: 2.4.7"
14+
cwe: 200
15+
wasc: 13
16+
alerttags:
17+
- CWE-200
18+
code: https://github.com/zaproxy/zap-extensions/blob/main/addOns/wappalyzer/src/main/java/org/zaproxy/zap/extension/wappalyzer/ExtensionWappalyzer.java
19+
linktext: "org/zaproxy/zap/extension/wappalyzer/ExtensionWappalyzer.java"
20+
help: https://www.zaproxy.org/docs/desktop/addons/technology-detection/options/#10004
21+
---
22+
The following "Web servers" technology was identified: Apache HTTP Server.

site/content/docs/alerts/10094-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ code: https://github.com/zaproxy/zap-extensions/blob/main/addOns/pscanrulesAlpha
2222
linktext: "org/zaproxy/zap/extension/pscanrulesAlpha/Base64Disclosure.java"
2323
help: https://www.zaproxy.org/docs/desktop/addons/passive-scan-rules-alpha/#id-10094
2424
---
25-
An ASP.NET ViewState was disclosed by the application/web server
25+
An ASP.NET ViewState was disclosed by the application/web server.

site/content/docs/alerts/10094-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ code: https://github.com/zaproxy/zap-extensions/blob/main/addOns/pscanrulesAlpha
2222
linktext: "org/zaproxy/zap/extension/pscanrulesAlpha/Base64Disclosure.java"
2323
help: https://www.zaproxy.org/docs/desktop/addons/passive-scan-rules-alpha/#id-10094
2424
---
25-
The application does not use a Message Authentication Code (MAC) to protect the integrity of the ASP.NET ViewState, which can be tampered with by a malicious client
25+
The application does not use a Message Authentication Code (MAC) to protect the integrity of the ASP.NET ViewState, which can be tampered with by a malicious client.

site/content/docs/alerts/40015.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ alertcount: 1
77
status: alpha
88
type: alert
99
risk: High
10-
solution: "Validate and/or escape all user input before using it to create an LDAP query. In particular, the following characters (or combinations) should be deny listed: & | ! < > = ~= >= <= * ( ) , + - \" ' ; \\ / NUL character "
10+
solution: "Validate and/or escape all user input before using it to create an LDAP query. In particular, the following characters (or combinations) should be deny listed: & | ! < > = ~= >= <= * ( ) , + - \" ' ; \\ / NUL character "
1111
references:
1212
- https://owasp.org/www-community/attacks/LDAP_Injection
1313
- https://cheatsheetseries.owasp.org/cheatsheets/LDAP_Injection_Prevention_Cheat_Sheet.html
@@ -24,4 +24,4 @@ code: https://github.com/zaproxy/zap-extensions/blob/main/addOns/ascanrulesAlpha
2424
linktext: "org/zaproxy/zap/extension/ascanrulesAlpha/LdapInjectionScanRule.java"
2525
help: https://www.zaproxy.org/docs/desktop/addons/active-scan-rules-alpha/#id-40015
2626
---
27-
LDAP Injection may be possible. It may be possible for an attacker to bypass authentication controls, and to view and modify arbitrary data in the LDAP directory.
27+
LDAP Injection may be possible. It may be possible for an attacker to bypass authentication controls, and to view and modify arbitrary data in the LDAP directory.

site/content/docs/alerts/40033.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ alertcount: 1
77
status: alpha
88
type: alert
99
risk: High
10-
solution: "Do not trust client side input and escape all data on the server side. Avoid to use the query input directly into the where and group clauses and upgrade all drivers at the latest available version."
10+
solution: "Do not trust client side input and escape all data on the server side. Avoid to use the query input directly into the where and group clauses and upgrade all drivers at the latest available version."
1111
references:
1212
- https://arxiv.org/pdf/1506.04082.pdf
1313
- https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/07-Input_Validation_Testing/05.6-Testing_for_NoSQL_Injection.html

site/content/docs/alerts/90039.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ alertcount: 1
77
status: alpha
88
type: alert
99
risk: High
10-
solution: "Do not trust client side input and escape all data on the server side. Avoid to use the query input directly into the where and group clauses and upgrade all drivers at the latest available version."
10+
solution: "Do not trust client side input and escape all data on the server side. Avoid to use the query input directly into the where and group clauses and upgrade all drivers at the latest available version."
1111
references:
1212
- https://arxiv.org/pdf/1506.04082.pdf
1313
- https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/07-Input_Validation_Testing/05.6-Testing_for_NoSQL_Injection.html

src/index.js

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ new BadgerAccordion(".js-badger-accordion", {
1010

1111
function removeAllChildNodes(parent) {
1212
while (parent.firstChild) {
13-
parent.removeChild(parent.firstChild);
13+
parent.removeChild(parent.firstChild);
1414
}
1515
}
1616

@@ -28,7 +28,7 @@ document.addEventListener("DOMContentLoaded", function() {
2828
Array.from(document.querySelectorAll("[data-sort-filter]")).map(function(el) {
2929
const widget = {
3030
options: {},
31-
filters: {}
31+
filters: {}
3232
};
3333

3434
// Checks if row matches against filter
@@ -45,47 +45,47 @@ document.addEventListener("DOMContentLoaded", function() {
4545

4646
// Create datalist that input can use for suggetions
4747
function setupDatalist(el, label, idx) {
48-
widget.options[idx] = document.createElement('datalist');
49-
widget.options[idx].setAttribute('id', 'opts_for_' + label);
50-
widget.options[idx]._options = []
48+
widget.options[idx] = document.createElement("datalist");
49+
widget.options[idx].setAttribute("id", "opts_for_" + label);
50+
widget.options[idx]._options = [];
5151
el.appendChild(widget.options[idx]);
5252
}
53-
53+
5454
// Add input for filtering
5555
function addInput(el, label, idx) {
56-
const input = document.createElement('input');
56+
const input = document.createElement("input");
5757
input.addEventListener("change", function(e) {
5858
widget.filters[idx] = e.target.value;
5959
removeAllChildNodes(tbody);
60-
rows.filter(isFilterMatch).map(r => {
61-
tbody.appendChild(r.el)
60+
rows.filter(isFilterMatch).map((r) => {
61+
tbody.appendChild(r.el);
6262
});
6363
});
64-
input.setAttribute('style', 'width:100%;display:block')
65-
input.setAttribute('type', 'text');
66-
input.setAttribute('name', 'filter_' + label);
67-
input.setAttribute('list', 'opts_for_' + label);
64+
input.setAttribute("style", "width:100%;display:block");
65+
input.setAttribute("type", "text");
66+
input.setAttribute("name", "filter_" + label);
67+
input.setAttribute("list", "opts_for_" + label);
6868
el.appendChild(input);
6969
}
70-
const tbody = el.querySelector('tbody');
71-
const headings = Array.from(el.querySelectorAll('thead th')).map((el, idx) => {
70+
const tbody = el.querySelector("tbody");
71+
const headings = Array.from(el.querySelectorAll("thead th")).map((el, idx) => {
7272
const isSuggested = el.getAttribute("data-suggest") !== null;
7373
const label = el.innerText.toLowerCase();
74-
el.appendChild(document.createElement('br'));
74+
el.appendChild(document.createElement("br"));
7575
addInput(el, label, idx);
76-
76+
7777
if (isSuggested) {
78-
setupDatalist(el, label, idx);
78+
setupDatalist(el, label, idx);
7979
}
8080
return {idx, isSuggested, label};
8181
});
8282

83-
const rows = Array.from(el.querySelectorAll('tbody tr')).map(tr => {
84-
const columns = Array.from(tr.querySelectorAll('td')).map((c, idx) => {
83+
const rows = Array.from(el.querySelectorAll("tbody tr")).map((tr) => {
84+
const columns = Array.from(tr.querySelectorAll("td")).map((c, idx) => {
8585
// For columns that match the index of the `data-suggest` headers
8686
// ... add the text value to options
8787
if (widget.options[idx]) {
88-
widget.options[idx]._options.push(c.innerText)
88+
widget.options[idx]._options.push(c.innerText);
8989
}
9090
return c.innerText;
9191
});
@@ -97,39 +97,39 @@ document.addEventListener("DOMContentLoaded", function() {
9797

9898
// Go through options elements and populate lists with column aggregates
9999
// gathered in previous loop
100-
Object.entries(widget.options).map(pair => {
100+
Object.entries(widget.options).map((pair) => {
101101
const [idx, el] = pair;
102102
const opts = [...new Set(el._options)];
103103
opts.sort((a, b) => a.length - b.length);
104-
opts.map(o => {
105-
const ol = document.createElement('option');
104+
opts.map((o) => {
105+
const ol = document.createElement("option");
106106
ol.innerText = o;
107107
return ol;
108-
}).map(ol => el.appendChild(ol));
108+
}).map((ol) => el.appendChild(ol));
109109
});
110110
});
111111

112112
function clearFilter(menu) {
113113
menu.classList.remove("is-filtering");
114-
Array.from(menu.getElementsByTagName('li')).map(function(el) {
114+
Array.from(menu.getElementsByTagName("li")).map(function(el) {
115115
el.classList.remove("tree-filter-match");
116116
});
117-
Array.from(menu.getElementsByTagName('ul')).map(function(el) {
118-
el.classList.remove("tree-branch-filter");
117+
Array.from(menu.getElementsByTagName("ul")).map(function(el) {
118+
el.classList.remove("tree-branch-filter");
119119
});
120120
}
121121

122122
function applyFilter(menu, filter) {
123123
menu.classList.add("is-filtering");
124-
Array.from(menu.getElementsByTagName('li')).map(function(el) {
124+
Array.from(menu.getElementsByTagName("li")).map(function(el) {
125125
const text = el.textContent.toLowerCase();
126126
if (text.indexOf(filter) !== -1) {
127127
el.classList.add("tree-filter-match");
128128
} else {
129129
el.classList.remove("tree-filter-match");
130130
}
131131
});
132-
Array.from(menu.getElementsByTagName('ul')).map(function(el) {
132+
Array.from(menu.getElementsByTagName("ul")).map(function(el) {
133133
const text = el.textContent.toLowerCase();
134134

135135
if (text.indexOf(filter) !== -1) {
@@ -151,18 +151,18 @@ document.addEventListener("DOMContentLoaded", function() {
151151
});
152152
});
153153

154-
const menu = document.getElementById('primary-menu');
155-
menu.querySelector('.toggler').addEventListener("click", function(e) {
154+
const menu = document.getElementById("primary-menu");
155+
menu.querySelector(".toggler").addEventListener("click", function(e) {
156156
e.preventDefault();
157157
menu.classList.toggle("in-search");
158158
});
159159

160160
Array.from(document.querySelectorAll("[track-event]")).map((el) => {
161161
el.addEventListener("click", function(e) {
162162
e.preventDefault();
163-
const [action, category, label] = el.getAttribute("track-event").split(".")
163+
const [action, category, label] = el.getAttribute("track-event").split(".");
164164
if (window.ga === undefined) {
165-
console.log("track-event", action, category, label);
165+
//console.log("track-event", action, category, label);
166166
} else {
167167
ga("send", {
168168
hitType: "event",
@@ -177,27 +177,27 @@ document.addEventListener("DOMContentLoaded", function() {
177177
}, 400);
178178
});
179179
});
180-
180+
181181
// Sortable tables
182182
// Based on https://stackoverflow.com/questions/14267781/sorting-html-table-with-javascript
183183
const getCellValue = (tr, idx) => tr.children[idx].innerText || tr.children[idx].textContent;
184184

185-
const comparer = (idx, asc) => (a, b) => ((v1, v2) =>
186-
v1 !== '' && v2 !== '' && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)
187-
)(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));
185+
const comparer = (idx, asc) => (a, b) => ((v1, v2) =>
186+
v1 !== "" && v2 !== "" && !isNaN(v1) && !isNaN(v2) ? v1 - v2 : v1.toString().localeCompare(v2)
187+
)(getCellValue(asc ? a : b, idx), getCellValue(asc ? b : a, idx));
188188

189-
document.querySelectorAll('th.sortable').forEach(th => th.addEventListener('click', (() => {
190-
const table = th.closest('table');
191-
Array.from(table.querySelectorAll('tr:nth-child(n+2)'))
192-
.sort(comparer(Array.from(th.parentNode.children).indexOf(th), this.asc = !this.asc))
193-
.forEach(tr => table.appendChild(tr) );
189+
document.querySelectorAll("th.sortable").forEach((th) => th.addEventListener("click", (() => {
190+
const table = th.closest("table");
191+
Array.from(table.querySelectorAll("tr:nth-child(n+2)"))
192+
.sort(comparer(Array.from(th.parentNode.children).indexOf(th), this.asc = !this.asc))
193+
.forEach((tr) => table.appendChild(tr));
194194
})));
195195

196196
// Tables with hidden rows
197-
document.querySelectorAll('input.togglehidetablerows').forEach(input => input.addEventListener('change', (() => {
198-
const table = input.closest('table');
199-
Array.from(table.querySelectorAll('tr.togglehide'))
200-
.forEach(tr => tr.style.display = input.checked ? '' : 'none');
197+
document.querySelectorAll("input.togglehidetablerows").forEach((input) => input.addEventListener("change", (() => {
198+
const table = input.closest("table");
199+
Array.from(table.querySelectorAll("tr.togglehide"))
200+
.forEach((tr) => tr.style.display = input.checked ? "" : "none");
201201
})));
202202

203203
});

0 commit comments

Comments
 (0)