Permalink
Browse files

Fixes url parsing bug -- reenables in-app auth flow

Summary:
Introduced a bug in URL parsing with the frictionless fix, which
failed to recognize urls that begin the parameter section with #

Test Plan:
Whitebox test using hackbook to force the in-app auth flow, and
confirm that the new line enables parsing of the returned URL

Reviewers: yariv, caabernathy, mmarucheck, vijaye

Reviewed By: mmarucheck

Differential Revision: https://phabricator.fb.com/D425267
  • Loading branch information...
1 parent e10bdc1 commit b512d54dfdbc3a33150bfef5cf44f4fb740993ba @onebit onebit committed Mar 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/FBDialog.m
View
@@ -566,7 +566,7 @@ - (NSString *) getStringFromUrl: (NSString*) url needle:(NSString *) needle {
if (start.location != 0) {
c = [url characterAtIndex:start.location - 1];
}
- if (c == '?' || c == '&') {
+ if (c == '?' || c == '&' || c == '#') {
NSRange end = [[url substringFromIndex:start.location+start.length] rangeOfString:@"&"];
NSUInteger offset = start.location+start.length;
str = end.location == NSNotFound ?

0 comments on commit b512d54

Please sign in to comment.