summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/lib/oauth.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/lib/oauth.js')
-rw-r--r--deps/npm/node_modules/request/lib/oauth.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/deps/npm/node_modules/request/lib/oauth.js b/deps/npm/node_modules/request/lib/oauth.js
index 56b39b0f51..13b693773e 100644
--- a/deps/npm/node_modules/request/lib/oauth.js
+++ b/deps/npm/node_modules/request/lib/oauth.js
@@ -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) {
@@ -70,7 +71,7 @@ OAuth.prototype.buildBodyHash = function(_oauth, body) {
shasum.update(body || '')
var sha1 = shasum.digest('hex')
- return new Buffer(sha1).toString('base64')
+ return Buffer.from(sha1).toString('base64')
}
OAuth.prototype.concatParams = function (oa, sep, wrap) {