Merge pull request #570 from thelounge/astorije/569-fix-auth
Make sure users with wrong tokens are locked out instead of crashing the app
This commit is contained in:
commit
eabc808565
@ -286,10 +286,10 @@ function auth(data) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
client = manager.findClient(data.user, data.token);
|
client = manager.findClient(data.user, data.token);
|
||||||
var signedIn = data.token && data.token === client.config.token;
|
var signedIn = data.token && client && data.token === client.config.token;
|
||||||
var token;
|
var token;
|
||||||
|
|
||||||
if (data.remember || data.token) {
|
if (client && (data.remember || data.token)) {
|
||||||
token = client.config.token;
|
token = client.config.token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user