Skip to content

Commit

Permalink
Merge pull request #2574 from request/safe-buffer
Browse files Browse the repository at this point in the history
Migrating to safe-buffer for improved security.
  • Loading branch information
mikeal committed Mar 4, 2017
2 parents 1425883 + f113253 commit 7ec8b84
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/helpers.js
Expand Up @@ -2,6 +2,7 @@

var jsonSafeStringify = require('json-stringify-safe')
, crypto = require('crypto')
, Buffer = require('safe-buffer').Buffer

var defer = typeof setImmediate === 'undefined'
? process.nextTick
Expand Down
1 change: 1 addition & 0 deletions lib/multipart.js
Expand Up @@ -3,6 +3,7 @@
var uuid = require('uuid')
, CombinedStream = require('combined-stream')
, isstream = require('isstream')
, Buffer = require('safe-buffer').Buffer


function Multipart (request) {
Expand Down
1 change: 1 addition & 0 deletions lib/oauth.js
Expand Up @@ -6,6 +6,7 @@ var url = require('url')
, uuid = require('uuid')
, oauth = require('oauth-sign')
, crypto = require('crypto')
, Buffer = require('safe-buffer').Buffer


function OAuth (request) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -44,9 +44,10 @@
"oauth-sign": "~0.8.1",
"performance-now": "^0.2.0",
"qs": "~6.3.0",
"safe-buffer": "^5.0.1",
"stringstream": "~0.0.4",
"tough-cookie": "~2.3.0",
"tunnel-agent": "~0.4.1",
"tunnel-agent": "^0.5.0",
"uuid": "^3.0.0"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions request.js
Expand Up @@ -29,6 +29,7 @@ var http = require('http')
, Redirect = require('./lib/redirect').Redirect
, Tunnel = require('./lib/tunnel').Tunnel
, now = require('performance-now')
, Buffer = require('safe-buffer').Buffer

var safeStringify = helpers.safeStringify
, isReadStream = helpers.isReadStream
Expand Down

0 comments on commit 7ec8b84

Please sign in to comment.