fix debugging
This commit is contained in:
@@ -247,10 +247,10 @@ class WTVShared {
|
|||||||
Object.keys(this.minisrv_config.services).forEach((k) => {
|
Object.keys(this.minisrv_config.services).forEach((k) => {
|
||||||
var flag = parseInt(this.minisrv_config.services[k].flags, 16);
|
var flag = parseInt(this.minisrv_config.services[k].flags, 16);
|
||||||
if (flag === 4 || flag === 7) {
|
if (flag === 4 || flag === 7) {
|
||||||
allowedProtocols.push(k);
|
if (!allowedProtocols.includes(k)) allowedProtocols.push(k);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(allowedProtocols);
|
self.debug("sanitizeSignature", "allowed protocols:", allowedProtocols);
|
||||||
|
|
||||||
const clean = this.sanitizeHtml(string, {
|
const clean = this.sanitizeHtml(string, {
|
||||||
allowedTags: ['a', 'audioscope', 'b', 'bgsound', 'big', 'blackface', 'blockquote', 'bq', 'br', 'caption', 'center', 'cite', 'c', 'dd', 'dfn', 'div', 'dl', 'dt', 'fn', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'html', 'i', 'img', 'label', 'li', 'link', 'listing', 'em', 'marquee', 'nobr', 'note', 'ol', 'p', 'plaintext', 'pre', 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tbody', 'table', 'td', 'th', 'tr', 'tt', 'u', 'ul'],
|
allowedTags: ['a', 'audioscope', 'b', 'bgsound', 'big', 'blackface', 'blockquote', 'bq', 'br', 'caption', 'center', 'cite', 'c', 'dd', 'dfn', 'div', 'dl', 'dt', 'fn', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'html', 'i', 'img', 'label', 'li', 'link', 'listing', 'em', 'marquee', 'nobr', 'note', 'ol', 'p', 'plaintext', 'pre', 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tbody', 'table', 'td', 'th', 'tr', 'tt', 'u', 'ul'],
|
||||||
@@ -269,7 +269,7 @@ class WTVShared {
|
|||||||
var allowed = true;
|
var allowed = true;
|
||||||
Object.keys(frame.attribs).forEach((k) => {
|
Object.keys(frame.attribs).forEach((k) => {
|
||||||
if (k == "href" || k == "background" || k == "src") {
|
if (k == "href" || k == "background" || k == "src") {
|
||||||
var allowed = false;
|
allowed = false;
|
||||||
var value = frame.attribs[k];
|
var value = frame.attribs[k];
|
||||||
Object.keys(allowedProtocols).forEach((j) => {
|
Object.keys(allowedProtocols).forEach((j) => {
|
||||||
if (value.startsWith(allowedProtocols[j])) {
|
if (value.startsWith(allowedProtocols[j])) {
|
||||||
@@ -279,7 +279,7 @@ class WTVShared {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(frame, allowed);
|
self.debug("sanitizeSignature", "filter result:", frame, "allowed:", allowed);
|
||||||
return !allowed;
|
return !allowed;
|
||||||
},
|
},
|
||||||
allowVulnerableTags: false,
|
allowVulnerableTags: false,
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
// wtv-1800
|
// wtv-1800
|
||||||
"port": 1615,
|
"port": 1615,
|
||||||
"connections": 1,
|
"connections": 1,
|
||||||
"flags": "0x00000004",
|
"flags": "0x00000001",
|
||||||
"send_tellyscripts": true // Best left untouched
|
"send_tellyscripts": true // Best left untouched
|
||||||
},
|
},
|
||||||
"wtv-flashrom": {
|
"wtv-flashrom": {
|
||||||
@@ -190,7 +190,8 @@
|
|||||||
"wtv-music": {
|
"wtv-music": {
|
||||||
// wtv-music
|
// wtv-music
|
||||||
"port": 1656,
|
"port": 1656,
|
||||||
"connections": 3
|
"connections": 3,
|
||||||
|
"flags": "0x00000004"
|
||||||
},
|
},
|
||||||
"wtv-cookie": {
|
"wtv-cookie": {
|
||||||
// wtv-cookie (used for http(s) cookies)
|
// wtv-cookie (used for http(s) cookies)
|
||||||
|
|||||||
Reference in New Issue
Block a user