Skip to content

Commit

Permalink
fix(xss): oauth_redirect should be a valid url
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSwitch committed Oct 6, 2020
1 parent 3b79ec9 commit d6f5137
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hello.js
Original file line number Diff line number Diff line change
Expand Up @@ -1388,8 +1388,12 @@ hello.utils.extend(hello.utils, {
// (URI Fragments within 302 Location URI are lost over HTTPS)
// Loading the redirect.html before triggering the OAuth Flow seems to fix it.
else if ('oauth_redirect' in p) {
var url = decodeURIComponent(p.oauth_redirect);

if (isValidUrl(url)) {
location.assign(url);
}

location.assign(decodeURIComponent(p.oauth_redirect));
return;
}

Expand Down

0 comments on commit d6f5137

Please # to comment.