http: use Buffer.from to avoid Buffer(num) call
This fixes a potential Buffer(num) call when the user passes a number as the 'auth' property. This now throws instead of allocating an unitialized memory Buffer and sending that in the Authorization header. Fixes: https://github.com/nodejs/security/issues/111 PR-URL: https://github.com/nodejs/node-private/pull/83 Reviewed-By:James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
parent
681cebb9
Please register or sign in to comment