A free, self-hostable news aggregator…
Prevent window opener vulnerability with space shortcut (#2506)
ArthurHoaro3f8804f54f84
diff --git a/p/scripts/main.js b/p/scripts/main.jsindex 4fd91235e..3f964e70e 100644--- a/p/scripts/main.js+++ b/p/scripts/main.js@@ -803,7 +803,11 @@ function init_shortcuts() {if (context.auto_mark_site) {mark_read(document.querySelector('.flux.current'), true, false);}- window.open(document.querySelector('.flux.current a.go_website').href);+ const newWindow = window.open();+ if (newWindow) {+ newWindow.opener = null;+ newWindow.location = document.querySelector('.flux.current a.go_website').href;+ }return false;}if (k === s.skip_next_entry) { next_entry(true); return false; }