security: add rel="noopener noreferrer" to external links

Prevents reverse tabnabbing attacks on target="_blank" links.
This commit is contained in:
google-labs-jules[bot]
2026-01-14 19:36:15 +00:00
parent e902a9c27a
commit d9be0207bb
3 changed files with 8 additions and 2 deletions
+4
View File
@@ -0,0 +1,4 @@
## 2024-05-22 - Reverse Tabnabbing Vulnerability
**Vulnerability:** External links with `target="_blank"` allow the opened page to access the `window.opener` object, potentially enabling the new page to redirect the original page (Reverse Tabnabbing).
**Learning:** Even internal tool links (like "GitHub") can be a vector if the destination is compromised or if it redirects. Always treat `target="_blank"` as unsafe.
**Prevention:** Enforce `rel="noopener noreferrer"` on all `target="_blank"` links.
+2 -1
View File
@@ -450,7 +450,8 @@ function renderSidebar(elRoot) {
const footer = el("div", { className: "christmas-footer" }, [
el("a", {
href: "https://github.com/AEmotionStudio/ComfyUI-ChristmasTheme",
target: "_blank"
target: "_blank",
rel: "noopener noreferrer"
}, ["🎁 GitHub"])
]);
const container = el("div", { className: "christmas-sidebar" }, [
+2 -1
View File
@@ -572,7 +572,8 @@ function renderSidebar(elRoot: HTMLElement): void {
const footer = el('div', { className: 'christmas-footer' }, [
el('a', {
href: "https://github.com/AEmotionStudio/ComfyUI-ChristmasTheme",
target: "_blank"
target: "_blank",
rel: "noopener noreferrer"
}, ["🎁 GitHub"])
]);