summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-05-13 13:56:29 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-05-13 13:56:29 -0700
commit8912cff77c5762ee55f49a335a46139980f15b4a (patch)
tree3ea53426df0770888444608cba648769c31b5093 /MobileCydia.mm
parent5fe2bcc666ee632689fded66cca7dd523d3a2728 (diff)
Decode all URL arguments before parsing the route.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index d959185..8c62d17 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -9677,20 +9677,20 @@ if (kCFCoreFoundationVersionNumber < 800) {
controller = [[[InstalledController alloc] initWithDatabase:database_] autorelease];
}
} else if ([components count] == 2) {
- NSString *argument = [components objectAtIndex:1];
+ NSString *argument = [[components objectAtIndex:1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
if ([base isEqualToString:@"package"]) {
controller = [self pageForPackage:argument withReferrer:referrer];
}
if (!external && [base isEqualToString:@"search"]) {
- controller = [[[SearchController alloc] initWithDatabase:database_ query:[argument stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] autorelease];
+ controller = [[[SearchController alloc] initWithDatabase:database_ query:argument] autorelease];
}
if (!external && [base isEqualToString:@"sections"]) {
if ([argument isEqualToString:@"all"])
argument = nil;
- controller = [[[SectionController alloc] initWithDatabase:database_ section:[argument stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]] autorelease];
+ controller = [[[SectionController alloc] initWithDatabase:database_ section:argument] autorelease];
}
if (!external && [base isEqualToString:@"sources"]) {
@@ -9698,7 +9698,7 @@ if (kCFCoreFoundationVersionNumber < 800) {
controller = [[[SourcesController alloc] initWithDatabase:database_] autorelease];
[(SourcesController *)controller showAddSourcePrompt];
} else {
- Source *source = [database_ sourceWithKey:[argument stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
+ Source *source([database_ sourceWithKey:argument]);
controller = [[[SourceController alloc] initWithDatabase:database_ source:source] autorelease];
}
}
@@ -9708,8 +9708,8 @@ if (kCFCoreFoundationVersionNumber < 800) {
return nil;
}
} else if (!external && [components count] == 3) {
- NSString *arg1 = [components objectAtIndex:1];
- NSString *arg2 = [components objectAtIndex:2];
+ NSString *arg1 = [[components objectAtIndex:1] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+ NSString *arg2 = [[components objectAtIndex:2] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
if ([base isEqualToString:@"package"]) {
if ([arg2 isEqualToString:@"settings"]) {