Closed GrahamDumpleton closed 5 years ago
After some extra additions to validate session and return error message, new error is now from:
if (req.session.handshakes[state] === undefined) {
return res.status(400).json('Invalid session');
}
So maybe shouldn't clear the state from handshakes cache immediately.
That is, in:
var next_url = req.session.handshakes[state];
delete req.session.handshakes[state];
Find another way to expire them if necessary.
Possibly also related to code:
if (Object.keys(req.session.handshakes).length > 10) {
// If the number of oustanding auth handshakes gets to be
// too many, something fishy going on so clear them all and
// start over again.
req.session.handshakes = {}
}
Increased number of states allow before clearing. Also redirect back to main page if don't know about session state. This could be an issue if request was against a sub URL, so may still have to change it back to an error.
Not seen this again after changes, so closing.
In some cases when hitting the URL
/restart
to force a restart, the proxy in the dashboard instance is redirecting to/user/<username>/undefined
.