Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
simonua opened this issue Apr 29, 2019 · 0 comments · Fixed by #174
Closed

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

simonua opened this issue Apr 29, 2019 · 0 comments · Fixed by #174
Assignees

Comments

@simonua
Copy link
Collaborator

simonua commented Apr 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant