Filter, always generate hash if label isn't provided. for https://github.com/opnsense/core/issues/3312

This commit is contained in:
Ad Schellevis 2019-03-19 13:44:01 +01:00
parent a66852b433
commit 4c0f9a797e

View File

@ -242,8 +242,8 @@ class Plugin
if ($defaults != null) {
$conf = array_merge($defaults, $conf);
}
if (empty($conf['label']) && !empty($conf['#ref'])) {
// generated rule, has an anchor but no label if it's trackable
if (empty($conf['label'])) {
// generated rule, has no label
$rule_hash = Util::calcRuleHash($conf);
$conf['label'] = $rule_hash;
}