Unverified Commit d6969a71 authored by Сковорода Никита Андреевич's avatar Сковорода Никита Андреевич Committed by Myles Borins
Browse files

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: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
parent 681cebb9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment