santactl/sync: Validate incoming rules better

This commit is contained in:
Russell Hancox
2015-09-16 15:59:50 -04:00
parent 2bc3df3255
commit 8faf3eec53

View File

@@ -107,6 +107,7 @@
SNTRule *newRule = [[SNTRule alloc] init];
newRule.shasum = dict[kRuleSHA256];
if (newRule.shasum.length != 64) return nil;
NSString *policyString = dict[kRulePolicy];
if ([policyString isEqual:kRulePolicyWhitelist]) {
@@ -131,7 +132,7 @@
}
NSString *customMsg = dict[kRuleCustomMsg];
if (customMsg) {
if (customMsg.length) {
newRule.customMsg = customMsg;
}