mirror of
https://github.com/google/santa.git
synced 2026-04-24 03:00:12 -04:00
santactl/sync: Validate incoming rules better
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user