We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26c4750 commit 72f9199Copy full SHA for 72f9199
src/hello.js
@@ -1513,11 +1513,20 @@ hello.utils.extend(hello.utils, {
1513
// (URI Fragments within 302 Location URI are lost over HTTPS)
1514
// Loading the redirect.html before triggering the OAuth Flow seems to fix it.
1515
else if ('oauth_redirect' in p) {
1516
+ var url = decodeURIComponent(p.oauth_redirect);
1517
+
1518
+ if (isValidUrl(url)) {
1519
+ location.assign(url);
1520
+ }
1521
- location.assign(decodeURIComponent(p.oauth_redirect));
1522
return;
1523
}
1524
1525
+ function isValidUrl(url) {
1526
+ var regexp = /^https?:/;
1527
+ return regexp.test(url);
1528
1529
1530
// Trigger a callback to authenticate
1531
function authCallback(obj, window, parent) {
1532
0 commit comments