From bead24e760a05c3919d5f8d29361706affdadf54 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 22 Jul 2014 11:33:52 +0100 Subject: [PATCH] HTTP In node: Check credentials exist before using --- nodes/core/io/21-httpin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/core/io/21-httpin.js b/nodes/core/io/21-httpin.js index 87152fe11..bbc8b411c 100644 --- a/nodes/core/io/21-httpin.js +++ b/nodes/core/io/21-httpin.js @@ -169,7 +169,7 @@ module.exports = function(RED) { opts.headers[v.toLowerCase()] = msg.headers[v]; } } - if (this.credentials.user) { + if (this.credentials && this.credentials.user) { opts.auth = this.credentials.user+":"+(this.credentials.password||""); } var payload = null;