Service / Intrusion Detection / Policies: type error in 'enabled' field (bool vs str), closes https://github.com/opnsense/core/issues/4753

This commit is contained in:
Ad Schellevis 2021-02-25 20:02:59 +01:00
parent 90ad674928
commit 2696e42d3a

View File

@ -66,7 +66,7 @@ if __name__ == '__main__':
# generate altered rule
if 'enabled' in rule_updates[rule_info_record['metadata']['sid']]:
# enabled / disabled in configuration
if (rule_updates[rule_info_record['metadata']['sid']]['enabled']) == '0':
if not rule_updates[rule_info_record['metadata']['sid']]['enabled']:
rule = ('#%s' % rule[i:])
else:
rule = rule[i:]