mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add security checks
This commit is contained in:
parent
96820418b5
commit
869ae01da9
@ -439,7 +439,9 @@ module.exports = function(RED) {
|
|||||||
//node.log(RED._("tcpin.errors.client-connected"));
|
//node.log(RED._("tcpin.errors.client-connected"));
|
||||||
node.status({fill:"green",shape:"dot",text:"common.status.connected"});
|
node.status({fill:"green",shape:"dot",text:"common.status.connected"});
|
||||||
node.connected = true;
|
node.connected = true;
|
||||||
clients[cid].write(msg.payload);
|
if (clients[cid]) {
|
||||||
|
clients[cid].write(msg.payload);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -459,7 +461,7 @@ module.exports = function(RED) {
|
|||||||
for (var j = 0; j < data.length; j++ ) {
|
for (var j = 0; j < data.length; j++ ) {
|
||||||
if (node.out === "time") {
|
if (node.out === "time") {
|
||||||
// do the timer thing
|
// do the timer thing
|
||||||
if (clients[cid].timeout) {
|
if (clients[cid] && clients[cid].timeout) {
|
||||||
i += 1;
|
i += 1;
|
||||||
buf[i] = data[j];
|
buf[i] = data[j];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user