local-devices icon indicating copy to clipboard operation
local-devices copied to clipboard

Buffer() is deprecated due to security and usability issues

Open oza75 opened this issue 5 years ago • 2 comments

(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

oza75 avatar May 30 '19 18:05 oza75

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

natterstefan avatar Jun 03 '19 16:06 natterstefan

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.

lucafornerone avatar Sep 10 '20 10:09 lucafornerone