diff --git a/airsonic-main/src/main/resources/templates/head.html b/airsonic-main/src/main/resources/templates/head.html index dc1afe6d3..ff7f91cff 100644 --- a/airsonic-main/src/main/resources/templates/head.html +++ b/airsonic-main/src/main/resources/templates/head.html @@ -23,6 +23,13 @@ + + \ No newline at end of file diff --git a/airsonic-main/src/main/resources/templates/home.html b/airsonic-main/src/main/resources/templates/home.html index 17819a251..07125503a 100644 --- a/airsonic-main/src/main/resources/templates/home.html +++ b/airsonic-main/src/main/resources/templates/home.html @@ -1,5 +1,6 @@ - + + @@ -48,7 +49,7 @@

+
- +
diff --git a/airsonic-main/src/main/resources/templates/homePager.html b/airsonic-main/src/main/resources/templates/homePager.html index 79878d1e7..54ef8d415 100644 --- a/airsonic-main/src/main/resources/templates/homePager.html +++ b/airsonic-main/src/main/resources/templates/homePager.html @@ -1,12 +1,17 @@ - + + + + + + + +
- - - + @@ -14,12 +19,15 @@ @@ -28,11 +36,9 @@ @@ -41,9 +47,11 @@ @@ -64,3 +72,5 @@
-
-
-
+
+
+
- + + + - + + - +
+ + \ No newline at end of file diff --git a/airsonic-main/src/main/resources/templates/mediaMain.html b/airsonic-main/src/main/resources/templates/mediaMain.html index bc1b78aaa..0eb43400a 100644 --- a/airsonic-main/src/main/resources/templates/mediaMain.html +++ b/airsonic-main/src/main/resources/templates/mediaMain.html @@ -829,7 +829,8 @@ feather.replace(); Array.from(document.querySelectorAll('svg.feather[title]')).forEach((element) => { - element.insertAdjacentHTML('afterbegin', `${element.attributes.title.value}`); + const title = DOMPurify.sanitize(element.attributes.title.value); + element.insertAdjacentHTML('afterbegin', '' + title + ''); }); } @@ -921,7 +922,8 @@ $("#starMediaDir").empty().append(feather.icons.star.toSvg({title: svgTitle})); } Array.from(document.querySelectorAll('#starMediaDir svg.feather[title]')).forEach((element) => { - element.insertAdjacentHTML('afterbegin', `${element.attributes.title.value}`); + const title = DOMPurify.sanitize(element.attributes.title.value); + element.insertAdjacentHTML('afterbegin', '' + title + ''); }); } diff --git a/airsonic-main/src/main/resources/templates/playQueue.html b/airsonic-main/src/main/resources/templates/playQueue.html index 630e2ad42..e03982bde 100644 --- a/airsonic-main/src/main/resources/templates/playQueue.html +++ b/airsonic-main/src/main/resources/templates/playQueue.html @@ -9,6 +9,7 @@ + @@ -59,7 +60,7 @@ if (elt.hasAttribute("class")) node.setAttribute("class", elt.getAttribute("class")); if (newState) { - if (elt.hasAttribute("data-href")) node.setAttribute("href", elt.getAttribute("data-href")); + if (elt.hasAttribute("data-href")) node.setAttribute("href", DOMPurify.sanitize(elt.getAttribute("data-href"))); node.classList.remove("disabled"); node.removeAttribute("aria-disabled"); } else { diff --git a/airsonic-main/src/main/resources/templates/podcastChannel.html b/airsonic-main/src/main/resources/templates/podcastChannel.html index dcd2ab0d3..fe24e5a42 100644 --- a/airsonic-main/src/main/resources/templates/podcastChannel.html +++ b/airsonic-main/src/main/resources/templates/podcastChannel.html @@ -24,7 +24,6 @@ -