https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162021-02-09T07:54:06ZpfSense bugtrackerpfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509782021-02-09T07:54:06ZBill Meeks
<ul></ul><p>I failed to note that mixed-case alias names will correctly resolve when nested in pfSense-2.4.5, so this appears limited to 2.5.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509812021-02-09T08:53:19ZViktor Gurov
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li></ul><p>unable to reproduce on 2.5.0.a.20210204.2250<br />fixed in <a class="issue tracker-1 status-3 priority-4 priority-default closed" title="Bug: Mixed & Upper case Alias table names broken. (Resolved)" href="https://redmine.pfsense.org/issues/10968">#10968</a></p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509822021-02-09T09:01:29ZBill Meeks
<ul></ul><p>Viktor: this is the version I am testing on --</p>
<p>2.5.0-DEVELOPMENT (amd64)<br />built on Thu Feb 04 22:53:51 CST 2021<br />FreeBSD 12.2-STABLE</p>
<p>I can reliably create the issue as described. I will try pulling down a gitsync on my virtual machine to see if the issue resolves for me.</p>
<p>Bill</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509852021-02-09T09:08:34ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>New</i></li></ul> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509862021-02-09T09:14:46ZJim Pingle
<ul></ul><p>If <a class="issue tracker-1 status-3 priority-4 priority-default closed" title="Bug: Mixed & Upper case Alias table names broken. (Resolved)" href="https://redmine.pfsense.org/issues/10968">#10968</a> fixed it then something else broke it again. I can reproduce it easily here.</p>
<pre>
: grep -i nesttest /conf/config.xml
<name>NestTest1</name>
<name>NestTest2</name>
<name>NestTestBoth</name>
<address>nesttest1 nesttest2</address>
</pre>
<p>The names were changed to lowercase. I repeated the test twice with two sets of completely new aliases. Same result.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509872021-02-09T09:16:39ZViktor Gurov
<ul></ul><p>hm, my test configuration:<br /><pre>
<alias>
<name>LinPC_HOSTS</name>
<type>host</type>
<address>2.2.2.2</address>
<descr></descr>
<detail><![CDATA[Entry added Tue, 09 Feb 2021 17:43:47 +0300]]></detail>
</alias>
<alias>
<name>WinPC_HOSTs</name>
<type>host</type>
<address>1.1.1.1</address>
<descr></descr>
<detail><![CDATA[Entry added Tue, 09 Feb 2021 17:43:47 +0300]]></detail>
</alias>
<alias>
<name>mixedhosts</name>
<type>host</type>
<address>LinPC_HOSTS WinPC_HOSTs</address>
<descr></descr>
<detail><![CDATA[Entry added Tue, 09 Feb 2021 17:44:23 +0300||Entry added Tue, 09 Feb 2021 17:44:23 +0300]]></detail>
</alias>
# grep mixedhosts /tmp/rules.debug
table <mixedhosts> { 2.2.2.2 1.1.1.1 }
mixedhosts = "<mixedhosts>"
pass in quick on $WAN reply-to ( vtnet1 192.168.89.5 ) inet proto tcp from $mixedhosts to any tracker 1611243200 flags S/SA keep state label "USER_RULE"
</pre></p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509882021-02-09T09:24:18ZJim Pingle
<ul></ul><p>Might be something in your running state, but it happens consistently every time for me here. I don't have any of the aliases in firewall rules (yet), I'm just creating them and trying to nest before they are in use. Might be something there.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509892021-02-09T09:28:14ZBill Meeks
<ul></ul><p>I am also wondering if it is some kind of "race" thing perhaps???</p>
<p>I see a check in the new code that tests each value submitted to idn_to_utf8() to see if it is an existing alias. If so, it is returned "as-is" and not run through the function. But it appears that test is failing sometimes, for some reason, and thus the <address> value for an edited or newly created alias is getting changed to lowercase via being passed to, and processed by, the PHP idn_to_utf8() or idn_to_ascii() functions.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509902021-02-09T09:31:28ZViktor Gurov
<ul></ul><p>extra checks:<br /><a class="external" href="https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/129">https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/129</a></p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509912021-02-09T09:39:03ZBill Meeks
<ul></ul><p>I am unable to pull down the changes from that private repo, so can't test. Will depend on Jim to test from his end.</p>
<p>Bill</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509922021-02-09T09:40:22ZJim Pingle
<ul></ul><p>Still failed for me with that patch applied. Ends up with lowercase contents every time I try it.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509932021-02-09T10:13:49ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Not a Bug</i></li></ul><p>OK I figured out what caused this. It's not a problem in current code, but somewhere along the way snapshots had alias-utils.inc in <code>/etc/inc/alias-utils.inc</code> and then it moved to <code>/etc/inc/web/alias-utils.inc</code> -- the "old" copy was still there, and it was included first, which meant fixes in the new location were not respected.</p>
<p>If you <code>rm /etc/inc/alias-utils.inc</code> and then restart the GUI (16/11 from the console, or reboot) then try again it should work.</p>
<p>It wouldn't be a problem on fresh installs after it moved to the new location, or when upgrading from 2.4.x after the location was moved.</p>
<p>Normally we'd put in an obsoleted files entry but since it only affected some snapshots it may not be worth the effort.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509942021-02-09T10:16:26ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Not a Bug</i> to <i>Feedback</i></li><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li><li><strong>Target version</strong> set to <i>2.5.0</i></li></ul><p>Changed my mind, I added an entry to remove the old file. It's a simple change and may prevent others from having the same problem.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509962021-02-09T10:21:19ZBill Meeks
<ul></ul><p>Thanks! Good catch. I was pulling my hair out, because I could see what "should" be bypassing the problem but it wasn't working. My virtual machine indeed had the old copy of the file in /etc/inc.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=509972021-02-09T10:25:11ZJim Pingle
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="This file moved, remove old copy. Fixes #11389" href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/860391bfcb5d273daef32780003014cfdd557a6d">860391bfcb5d273daef32780003014cfdd557a6d</a>.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=510002021-02-09T10:58:54ZBill Meeks
<ul></ul><p>Confirmed working now with the old file deleted in my 2.5 VM. This issue can be marked resolved.</p> pfSense - Bug #11389: Mixed-case or Uppercase Alias names will not resolve when nested within another Aliashttps://redmine.pfsense.org/issues/11389?journal_id=510022021-02-09T11:07:12ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul>