Skip to content

Commit 287a63b

Browse files
author
Nico Oelgart
authored
Merge pull request #25 from ajorpheus/master
Fix regex to parse callback URL & save access token
2 parents 468b6fd + 2e35da6 commit 287a63b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

put.io adder/PutioHelper.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ - (void)checkForUpdates
340340
- (void)saveAccessToken:(NSString *)url
341341
{
342342
NSError *error = nil;
343-
NSString *pattern = @"^putio://callback#access_token=(.*)";
343+
NSString *pattern = @"^putio://callback\\?#access_token=(.*)";
344344
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:&error];
345345
NSArray *matches = [regex matchesInString:url options:0 range:NSMakeRange(0, [url length])];
346346

@@ -387,4 +387,4 @@ - (NSString*)transformedValue:(double)value
387387
return [str stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
388388
}
389389

390-
@end
390+
@end

0 commit comments

Comments
 (0)