Skip to content

Buffer() is deprecated due to security issues. #173

@simonua

Description

@simonua

The code (in one instance) and the tests (in many instances) use Buffer(), which has been deprecated in NodeJS 6.0.0:

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

Replace Buffer() with Buffer.from, which was added in NodeJS 5.10.0. All versions prior to 6, and, within days, 6 as well, are already deprecated, so this should be a benign, non-breaking change; however, package.json still shows support for 4.2.0.

Maybe the approach should be to wait a couple more days until NodeJS 6 is deprecated, then update the minimum version to NodeJS 8 (EOL end of 2019) and perhaps issue a major version change.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions