bugfix iframe login

这个提交包含在:
AJ ONeal 2017-02-21 17:37:44 -07:00
父节点 6092408a3f
当前提交 ce0bdbd108
共有 2 个文件被更改,包括 6 次插入1 次删除

查看文件

@ -529,7 +529,7 @@
}
console.warn('[Warn] Please implement OAUTH3.hooks.session.get = function (providerUri) { return PromiseA<savedSession>; }');
if (!OAUTH3.hooks.session._sessions) { OAUTH3.hooks.session._sessions = {}; }
return OAUTH3.PromiseA.resolve(OAUTH3.hooks.session._sessions[providerUri]);
return OAUTH3.PromiseA.resolve(OAUTH3.hooks.session._sessions[providerUri] || null);
}
}
}

查看文件

@ -27,6 +27,11 @@
if (loginWinObj.debug) {
console.warn(prefix, "DEBUG MODE ENABLED. Automatic redirects disabled.");
}
if (!loginWinObj.state) {
console.error(loginWinObj);
window.alert(prefix + ": missing state parameter");
}
// '--oauth3-callback-' prefix exist for security so that an attacker can't social engineer execution an arbitrary function
// TODO finalize name of '--oauth3-callback-', this will be a defacto standard
// TODO maybe call it 'self-xss-' or 'hack-my-account-' to discourage people from doing dumb things?