SECURITY: Fix tab nabbing.

This commit is contained in:
Dan Ungureanu 2019-04-25 00:34:59 +03:00
parent b264661fe2
commit 2a8118fb44
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84

View File

@ -157,7 +157,9 @@ export default {
});
}
if (openWindow) {
window.open(destUrl, "_blank").focus();
const newWindow = window.open(destUrl, "_blank");
newWindow.opener = null;
newWindow.focus();
} else {
DiscourseURL.routeTo(href);
}
@ -165,7 +167,9 @@ export default {
}
if (openWindow) {
window.open(destUrl, "_blank").focus();
const newWindow = window.open(destUrl, "_blank");
newWindow.opener = null;
newWindow.focus();
} else {
DiscourseURL.redirectTo(destUrl);
}