Skip to content
This repository
Browse code

[Issue #36] Fixing sort order of HMAC signature

Signed-off-by: Mattt Thompson <m@mattt.me>
  • Loading branch information...
commit c8f53e860eeace8486b73bb763bdb8c58696b572 1 parent 584b620
touchbyte GmbH touchbyte authored mattt committed

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  AFOAuth1Client/AFOAuth1Client.m
2  AFOAuth1Client/AFOAuth1Client.m
@@ -119,7 +119,7 @@ static inline BOOL AFQueryStringValueIsTrue(NSString *value) {
119 119 NSString *secretString = [NSString stringWithFormat:@"%@&%@", consumerSecret, secret];
120 120 NSData *secretStringData = [secretString dataUsingEncoding:stringEncoding];
121 121
122   - NSString *queryString = AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([[[[[request URL] query] componentsSeparatedByString:@"&"] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] componentsJoinedByString:@"&"], stringEncoding);
  122 + NSString *queryString = AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([[[[[request URL] query] componentsSeparatedByString:@"&"] sortedArrayUsingSelector:@selector(compare:)] componentsJoinedByString:@"&"], stringEncoding);
123 123 NSString *requestString = [NSString stringWithFormat:@"%@&%@&%@", [request HTTPMethod], AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([[[request URL] absoluteString] componentsSeparatedByString:@"?"][0], stringEncoding), queryString];
124 124 NSData *requestStringData = [requestString dataUsingEncoding:stringEncoding];
125 125

0 comments on commit c8f53e8

Please sign in to comment.
Something went wrong with that request. Please try again.