mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
MVC/Firewall/Util - prevent possible infinite loop (#6288)
Prevent possible infinite loop in getPortAlias if alias references itself somehow
This commit is contained in:
parent
6bb7da4cbf
commit
4ada25398e
@ -208,6 +208,7 @@ class Util
|
||||
$result = array();
|
||||
foreach (self::$aliasObject->aliasIterator() as $node) {
|
||||
if (!empty($name) && (string)$node['name'] == $name && $node['type'] == 'port') {
|
||||
$aliases[] = $name;
|
||||
foreach ($node['content'] as $address) {
|
||||
if (Util::isAlias($address)) {
|
||||
if (!in_array($address, $aliases)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user