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

Clone credentials when passing to node

Fixes #1198
This commit is contained in:
Nick O'Leary 2017-04-10 21:45:04 +01:00
parent 62876ca377
commit 08d21ccba7
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -17,6 +17,7 @@
var when = require("when");
var path = require("path");
var fs = require("fs");
var clone = require("clone");
var registry = require("./registry");
var credentials = require("./credentials");
@ -69,6 +70,7 @@ function createNode(node,def) {
}
var creds = credentials.get(id);
if (creds) {
creds = clone(creds);
//console.log("Attaching credentials to ",node.id);
// allow $(foo) syntax to substitute env variables for credentials also...
for (var p in creds) {