Project

General

Profile

Actions

Bug #11389

closed

Mixed-case or Uppercase Alias names will not resolve when nested within another Alias

Added by Bill Meeks about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
FilterDNS
Target version:
Start date:
02/09/2021
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.5.0
Affected Architecture:
All

Description

The inclusion of calls to the PHP function idn_to_utf8() and idn_to_ascii() in pfSense-2.5 appear to have inadvertently broken the nesting of Aliases when the alias name is of mixed case (combination of uppercase and lowercase letters), or when the alias name is all uppercase. This happens because the <address> element of an Alias entry is converted to lowercase by the PHP subsystem call. Thus the <address> element no longer matches up with the actual parent Alias name in the case of nesting. So when the system attempts to resolve the value of any nested aliases, it is unable to locate the actual alias in config.xml because of the lowercase conversion.

To reproduce on the most recent 2.5 snapshot, do the following:

1. Under FIREWALL > ALIASES, create a new alias with a mixed-case name such as "Linux_PCs" and enter one or two IP addresses as the alias value.

2. Repeat the step above creating a second new alias with a mixed-case name such as "Windows_PCs" and enter one or two IP addresses for the value.

3. Now create a third new alias whose "values" are the names of the mixed-case aliases created above. So for example, create an alias named "Workstations" and then type in "Linux_PCs" and "Windows_PCs" as the host values.

4. Hit APPLY now to apply all the updates.

5. Create a firewall rule using the new "Workstations" nested alias as either a source or destination target and apply to reload the filter.

6. Go to DIAGNOSTICS > TABLES and select the "Workstations" alias to view. Note that it will be blank. It should instead be showing the IP addresses associated with the nested aliases "Linux_PCs" and "Windows_PCs".

Note that if you delete the aliases created in the steps above and repeat the process of recreating them, but use all lowercase names for the nested aliases instead of mixed-case (e.g., "linux_pcs" and "windows_pcs", then the nesting will resolve correctly and when looking at the "Workstations" table in DIAGNOSTICS > TABLES, it will correctly show the IP addresses from the nested aliases.

Actions

Also available in: Atom PDF