Firewall: Rules - hide internal aliases to align with previous legacy_list_aliases() function. closes https://github.com/opnsense/core/issues/8322

This commit is contained in:
Ad Schellevis 2025-02-12 18:39:49 +01:00
parent c8173dddda
commit 7fd17d527d

View File

@ -110,7 +110,10 @@ abstract class FilterBaseController extends ApiMutableModelControllerBase
}
}
foreach ((new Alias())->aliases->alias->iterateItems() as $alias) {
if (strpos((string)$alias->type, "port") === false) {
if ($alias->type == 'internal') {
/* currently only used for legacy bindings, align with legacy_list_aliases() usage */
continue;
} elseif (strpos((string)$alias->type, "port") === false) {
$result['aliases']['items'][(string)$alias->name] = (string)$alias->name;
}
}