Skip to content
Permalink
Browse files Browse the repository at this point in the history
only redirect exact hostname matches
  • Loading branch information
geichelberger committed Aug 26, 2022
1 parent 211399f commit d2ce232
Showing 1 changed file with 9 additions and 4 deletions.
Expand Up @@ -19,13 +19,18 @@
var redirect = search['redirect'];
var id = search['id'];
var series = search['series'] || search['sid'] || search['epFrom'];
if (redirect != undefined) {
window.location.href = decodeURIComponent(redirect);
if (redirect !== undefined) {
let redirectDomain = new URL(redirect);

This comment has been minimized.

Copy link
@Rillke

Rillke Nov 28, 2022

Member

redirect is still encoded as URL Parameter, thus

image

and redirect getting stuck

This comment has been minimized.

Copy link
@Rillke

Rillke Nov 28, 2022

Member

#4494 for that

if (window.location.hostname.toUpperCase() === redirectDomain.hostname.toUpperCase()) {
window.location.href = decodeURIComponent(redirect);
} else {
window.location.href = "/engage/ui/index.html";
}
}
else if (id != undefined) {
else if (id !== undefined) {
window.location.href = "watch.html?id=" + id;
}
else if (series != undefined) {
else if (series !== undefined) {
window.location.href = "/engage/ui/index.html?epFrom=" + series;
}
else {
Expand Down

0 comments on commit d2ce232

Please sign in to comment.