Browse files

fix for scenarios in which there is no auth token secret. For instanc…

…e in step 1 of reverse auth. Prior to this fix the signing key had '(null)' appended to the end and the signature was invalid every time
  • Loading branch information...
Andrew Farmer
Andrew Farmer committed Feb 17, 2013
1 parent 3ce76d5 commit e499a0736a5b92392124fed85496f8a1565d3481
Showing with 1 addition and 1 deletion.
  1. +1 −1 OAuthCore.m
@@ -87,7 +87,7 @@ static NSInteger SortParameter(NSString *key1, NSString *key2, void *context) {
NSString *key = [NSString stringWithFormat:@"%@&%@",
[_oAuthConsumerSecret ab_RFC3986EncodedString],
- [_oAuthTokenSecret ab_RFC3986EncodedString]];
+ [_oAuthTokenSecret ab_RFC3986EncodedString] ?: @""];
NSData *signature = HMAC_SHA1(signatureBaseString, key);
NSString *base64Signature = [signature base64EncodedString];

0 comments on commit e499a07

Please sign in to comment.