Skip to content

Commit 895880a

Browse files
committed
this fixes a DOM-Based XSS when rendering multimedia metadata assuming the media-indexing option is enabled, a malicious media file could be uploaded to the server by a privileged user, executing arbitrary javascript on anyone visiting and viewing the directory the same vulnerability could also be triggered through an externally-hosted m3u file, by tricking a user into clicking a link to load and play this m3u file huge thanks to @altperfect for finding and reporting this!
1 parent 6bb27e6 commit 895880a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

copyparty/web/browser.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7464,7 +7464,7 @@ var search_ui = (function () {
74647464
nodes = ['<tr><td>-</td><td><div>' + links + '</div>', sz];
74657465

74667466
for (var b = 0; b < tagord.length; b++) {
7467-
var k = tagord[b],
7467+
var k = esc(tagord[b]),
74687468
v = r.tags[k] || "";
74697469

74707470
if (k == ".dur") {
@@ -7473,7 +7473,7 @@ var search_ui = (function () {
74737473
continue;
74747474
}
74757475

7476-
nodes.push(v);
7476+
nodes.push(esc('' + v));
74777477
}
74787478

74797479
nodes = nodes.concat([ext, unix2iso(ts)]);
@@ -8362,7 +8362,7 @@ var treectl = (function () {
83628362
top + tn.href + '" id="' + id + '">' + hname + '</a>', tn.sz];
83638363

83648364
for (var b = 0; b < res.taglist.length; b++) {
8365-
var k = res.taglist[b],
8365+
var k = esc(res.taglist[b]),
83668366
v = (tn.tags || {})[k] || "",
83678367
sv = null;
83688368

@@ -8371,7 +8371,7 @@ var treectl = (function () {
83718371
else if (k == ".up_at")
83728372
sv = v ? unix2iso(v) : "";
83738373
else {
8374-
ln.push(v);
8374+
ln.push(esc('' + v));
83758375
continue;
83768376
}
83778377
ln[ln.length - 1] += '</td><td sortv="' + v + '">' + sv;

0 commit comments

Comments
 (0)