Permalink
Browse files

Key: trim whitespace and new line characters in fillTokenWithResponse…

…Body
  • Loading branch information...
1 parent aefbbf8 commit f20839e83e05544274edfced80ab6de427124896 @romaonthego romaonthego committed Oct 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 RSOAuthEngine/RSOAuthEngine.m
@@ -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"]) {

0 comments on commit f20839e

Please sign in to comment.