Skip to content

Commit

Permalink
Key: trim whitespace and new line characters in fillTokenWithResponse…
Browse files Browse the repository at this point in the history
…Body
  • Loading branch information
romaonthego committed Oct 22, 2012
1 parent aefbbf8 commit f20839e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RSOAuthEngine/RSOAuthEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ - (void)fillTokenWithResponseBody:(NSString *)body type:(RSOAuthTokenType)tokenT
for (NSString *pair in pairs)
{
NSArray *elements = [pair componentsSeparatedByString:@"="];
NSString *key = [elements objectAtIndex:0];
NSString *key = [[elements objectAtIndex:0] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSString *value = [[elements objectAtIndex:1] urlDecodedString];

if ([key isEqualToString:@"oauth_token"]) {
Expand Down

0 comments on commit f20839e

Please sign in to comment.