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

Update Buffer initialization to non-deprecated method #154

Merged
merged 1 commit into from
Aug 10, 2020
Merged

Update Buffer initialization to non-deprecated method #154

merged 1 commit into from
Aug 10, 2020

Conversation

cwardcode
Copy link

Description

The purpose of this pull request is to update the Buffer initializations within the utility.js file away from the deprecated method (calling the Buffer constructor) , and instead call Buffer.from().

Calling the Buffer constructor has been deprecated and results in the following message during runtime, as detailed here:

The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead.

References

Issue #150

Testing

No tests have been added, although the test suite was re-ran and all tests are still passing.

Checklist

  • [no] I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • [yes] All active GitHub checks for tests, formatting, and security are passing
  • [n/a (using master)] The correct base branch is being used, if not master

@cwardcode cwardcode requested a review from a team July 29, 2020 15:48
@ottokruse
Copy link

Yes! I'm so tired of finding these in my logs

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

@jimmyjames jimmyjames self-requested a review August 10, 2020 16:44
@jimmyjames
Copy link
Contributor

Thanks for the contribution @cwardcode! 👍

@ottokruse
Copy link

When are you guys gonna publish to npm?

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

Successfully merging this pull request may close these issues.

None yet

6 participants