Commit 0fa8a86c authored by 艾娇平's avatar 艾娇平

校验host是否有值

parent f1746bc7
......@@ -191,7 +191,7 @@ static NSMutableDictionary *routeMap = nil;
//拦截所有的即将调转的url(value),如果不在白名单之中,让其使用GMThirdWebViewController加载.
NSString *valueHost = [[NSURL URLWithString:value] host];
Class cls = NSClassFromString(@"GMServerDomains");
if ([cls respondsToSelector:@selector(allowURLHost:)]) {
if (valueHost.length != 0 && [cls respondsToSelector:@selector(allowURLHost:)]) {
BOOL isAllow = [cls performSelector:@selector(allowURLHost:) withObject:valueHost];
if (!isAllow) {
host = @"third_webview";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment