Skip to content

Commit

Permalink
tokenSecret is encoded
Browse files Browse the repository at this point in the history
  • Loading branch information
tolgaakyuz committed Nov 5, 2012
1 parent 76ec860 commit 7309711
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/passport-http-oauth/strategies/consumer.js
Expand Up @@ -290,7 +290,7 @@ ConsumerStrategy.prototype.authenticate = function(req) {

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

if (signature !== computedSignature) {
Expand Down
2 changes: 1 addition & 1 deletion lib/passport-http-oauth/strategies/token.js
Expand Up @@ -222,7 +222,7 @@ TokenStrategy.prototype.authenticate = function(req) {

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

if (signature !== computedSignature) {
Expand Down

0 comments on commit 7309711

Please sign in to comment.