Skip to content

Commit 8acb4da

Browse files
3.0.10
Fix possible xss in folder page
1 parent cc6abc7 commit 8acb4da

2 files changed

Lines changed: 21 additions & 16 deletions

File tree

includes/js/functions.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -397,22 +397,26 @@ function simplePurifier(
397397
bSvgFilters = false
398398
)
399399
{
400-
return DOMPurify.sanitize(
401-
sanitizeDom(text)
402-
.replaceAll('&lt;', '<')
403-
.replaceAll('&#x3C;', '<')
404-
.replaceAll('&#60;', '<')
405-
.replaceAll('&gt;', '>')
406-
.replaceAll('&#x3E;', '>')
407-
.replaceAll('&#62;', '>')
408-
.replaceAll('&amp;', '&')
409-
.replaceAll('&#38;', '&')
410-
.replaceAll('&#x26;', '&')
411-
.replaceAll('&quot;', '"')
412-
.replaceAll('&#34;;', '"')
413-
.replaceAll('&#x22;', '"')
414-
.replaceAll('&#39;', "'"),
415-
{USE_PROFILES: {html:bHtml, svg:bSvg, svgFilters: bSvgFilters}}
400+
return sanitizeDom(
401+
DOMPurify.sanitize(
402+
text
403+
.replaceAll('&lt;', '<')
404+
.replaceAll('&#x3C;', '<')
405+
.replaceAll('&#x3c;', '<')
406+
.replaceAll('&#60;', '<')
407+
.replaceAll('&gt;', '>')
408+
.replaceAll('&#x3E;', '>')
409+
.replaceAll('&#x3e;', '>')
410+
.replaceAll('&#62;', '>')
411+
.replaceAll('&amp;', '&')
412+
.replaceAll('&#38;', '&')
413+
.replaceAll('&#x26;', '&')
414+
.replaceAll('&quot;', '"')
415+
.replaceAll('&#34;;', '"')
416+
.replaceAll('&#x22;', '"')
417+
.replaceAll('&#39;', "'"),
418+
{USE_PROFILES: {html:bHtml, svg:bSvg, svgFilters: bSvgFilters}}
419+
)
416420
);
417421
}
418422

pages/folders.js.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
'iconSelected': purifyRes.arrFields['iconSelected'],
118118
}
119119
console.log(data)
120+
return false;
120121
// Launch action
121122
$.post(
122123
'sources/folders.queries.php', {

0 commit comments

Comments
 (0)