1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Don't process subscription for unauthenticated comms link

Fixes #851
This commit is contained in:
Nick O'Leary 2017-04-11 14:48:19 +01:00
parent 301ac279ff
commit 36e1b2ba08
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -132,14 +132,14 @@ function start() {
if (anonymousUser) {
log.audit({event: "comms.auth",user:anonymousUser});
completeConnection(anonymousUser.permissions,false);
//TODO: duplicated code - pull non-auth message handling out
if (msg.subscribe) {
handleRemoteSubscription(ws,msg.subscribe);
}
} else {
log.audit({event: "comms.auth.fail"});
completeConnection(null,false);
}
//TODO: duplicated code - pull non-auth message handling out
if (msg.subscribe) {
handleRemoteSubscription(ws,msg.subscribe);
}
}
}
});