Skip to content

Commit 7309711

Browse files
committed
tokenSecret is encoded
1 parent 76ec860 commit 7309711

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/passport-http-oauth/strategies/consumer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ ConsumerStrategy.prototype.authenticate = function(req) {
290290

291291
if (signatureMethod == 'HMAC-SHA1') {
292292
var key = consumerSecret + '&';
293-
if (tokenSecret) { key += tokenSecret; }
293+
if (tokenSecret) { key += utils.encode(tokenSecret); }
294294
var computedSignature = utils.hmacsha1(key, base);
295295

296296
if (signature !== computedSignature) {

lib/passport-http-oauth/strategies/token.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ TokenStrategy.prototype.authenticate = function(req) {
222222

223223
if (signatureMethod == 'HMAC-SHA1') {
224224
var key = consumerSecret + '&';
225-
if (tokenSecret) { key += tokenSecret; }
225+
if (tokenSecret) { key += utils.encode(tokenSecret); }
226226
var computedSignature = utils.hmacsha1(key, base);
227227

228228
if (signature !== computedSignature) {

0 commit comments

Comments
 (0)