Looking4Cache / node-red-contrib-remote

Remote Access and Push Notifications for Node-RED
GNU General Public License v3.0
9 stars 2 forks source link

Using a global replace on the path is dangerous #8

Closed hardillb closed 3 years ago

hardillb commented 3 years ago

https://github.com/Looking4Cache/node-red-contrib-remote/blob/main/nodes/remote-commons.js#L22 assumes there will only ever be one instance of /nodes in the path. This is not a safe assumption.

You should use path.join(__dirname. "../package.json") to locate the required file.

Raise as the most likely cause of https://stackoverflow.com/questions/69859678/error-configurating-remote-node-red-module

Looking4Cache commented 3 years ago

Thanks for the help! I just changed it and released V1.3.2.