Opened on 09/21/2018 at 09:07:18 AM
Closed on 09/21/2018 at 02:06:39 PM
Last modified on 03/07/2019 at 08:23:50 AM
#6972 closed change (fixed)
Use Buffer.from instead of Buffer constructor
Reported by: | mjethani | Assignee: | mjethani |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Core | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | yes |
Review URL(s): |
Description
Background
In test/_common.js, we're using the Buffer constructor, which is deprecated and gives a warning on Node.js v10.10.0:
signatures.js (node:87303) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
The replacement is the Buffer.from function, which has been available since Node.js v5.10.0.
What to change
Replace new Buffer with Buffer.from in test/_common.js.
Hints for testers
There's nothing to test.
Attachments (0)
Change History (5)
comment:1 Changed on 09/21/2018 at 09:11:23 AM by mjethani
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:2 Changed on 09/21/2018 at 02:05:59 PM by abpbot
comment:3 Changed on 09/21/2018 at 02:06:39 PM by mjethani
- Resolution set to fixed
- Status changed from reviewing to closed
comment:4 Changed on 10/02/2018 at 03:20:13 PM by abpbot
A commit referencing this issue has landed:
Issue 6972 - Use Buffer.from in tests
comment:5 Changed on 03/07/2019 at 08:23:50 AM by ukacar
- Verified working set
Note: See
TracTickets for help on using
tickets.
A commit referencing this issue has landed:
Issue 6972 - Use Buffer.from in tests