Skip to content

Replace new Buffer()#3741

Merged
hueniverse merged 1 commit into
hapijs:masterfrom
idandagan1:master
Mar 2, 2018
Merged

Replace new Buffer()#3741
hueniverse merged 1 commit into
hapijs:masterfrom
idandagan1:master

Conversation

@idandagan1
Copy link
Copy Markdown
Contributor

Hi,
This is my first PR to hapi.js, after I posted in the discuss project (Link)

This PR is related to the issue with using new Buffer(). As you probably know, new Buffer() has been deprecated due to security issues and replaced by Buffer.from().

The changes:

  • replaced all new Buffer(string) with Buffer.from(string)
  • replaced all new Buffer(size) with Buffer.alloc(size)

I followed the "contributing guidelines" including tests.

@devinivy
Copy link
Copy Markdown
Member

It appears that the failures here are primarily due to the fact that the npm shrinkwrap needs updates (bounce to v1.2.0 so the tests can use background() and hoek to v5.0.3 to pass the nsp checks). I can confirm that a fresh install without the shrinkwrap passes all tests on node v8.9.4.

@hueniverse hueniverse self-assigned this Feb 19, 2018
@idandagan1
Copy link
Copy Markdown
Contributor Author

@devinivy should I run full update for the shrinkwrap file? or just for those you mentioned? (bounce and hoek)

@hueniverse hueniverse merged commit 8e367bb into hapijs:master Mar 2, 2018
@hueniverse hueniverse added the bug Bug or defect label Mar 2, 2018
@hueniverse hueniverse added this to the 17.2.2 milestone Mar 2, 2018
@lock
Copy link
Copy Markdown

lock Bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock Bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants