Permalink
Browse files

[Issue #36] Fixing sort order of HMAC signature

Signed-off-by: Mattt Thompson <m@mattt.me>
  • Loading branch information...
1 parent 584b620 commit c8f53e860eeace8486b73bb763bdb8c58696b572 @touchbyte touchbyte committed with mattt May 7, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 AFOAuth1Client/AFOAuth1Client.m
View
2 AFOAuth1Client/AFOAuth1Client.m
@@ -119,7 +119,7 @@ static inline BOOL AFQueryStringValueIsTrue(NSString *value) {
NSString *secretString = [NSString stringWithFormat:@"%@&%@", consumerSecret, secret];
NSData *secretStringData = [secretString dataUsingEncoding:stringEncoding];
- NSString *queryString = AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([[[[[request URL] query] componentsSeparatedByString:@"&"] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] componentsJoinedByString:@"&"], stringEncoding);
+ NSString *queryString = AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([[[[[request URL] query] componentsSeparatedByString:@"&"] sortedArrayUsingSelector:@selector(compare:)] componentsJoinedByString:@"&"], stringEncoding);
NSString *requestString = [NSString stringWithFormat:@"%@&%@&%@", [request HTTPMethod], AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([[[request URL] absoluteString] componentsSeparatedByString:@"?"][0], stringEncoding), queryString];
NSData *requestStringData = [requestString dataUsingEncoding:stringEncoding];

0 comments on commit c8f53e8

Please sign in to comment.