DylanPiercey / local-devices

🔮 Find devices connected to the current local network.
MIT License
139 stars 27 forks source link

Buffer() is deprecated due to security and usability issues #14

Open oza75 opened 5 years ago

oza75 commented 5 years ago

(node:9948) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Node version : v11.15.0

natterstefan commented 5 years ago

Thanks @oza75 for your report. I assume this is caused by one of our dependencies (not verified yet). We'll have to take a look at it closely and see if we can update/replace one of those deps.

//cc @DylanPiercey

lucafornerone commented 4 years ago

The problem is https://www.npmjs.com/package/ip related. In ip's code (/lib/ip.js) I replaced all 'new Buffer(x)' with 'new Buffer.alloc(x)', now I no longer receive DeprecationWarning message.