Bug #9047
closedSSH port is not being saved properly
0%
Description
Hi guys,
After upgrading from 2.4.3-RELEASE (amd64) to 2.4.4-RELEASE, I noticed that my config wasn't generated properly. I got this notification:
There were error(s) loading the rules: /tmp/rules.debug:91: unknown port e - The line in question reads [91]: block in log quick proto tcp from <sshguard> to (self) port e tracker 1000000301 label "sshguard" @ 2018-10-17 15:07:51
So, the content of the /tmp/rules.debug:91 was:
block in log quick proto tcp from <sshguard> to (self) port e tracker 1000000301 label "sshguard"
I tried to save '22' as SSH port on /system_advanced_admin.php and it didn't work properly. I refreshed the page and I got just '2' as SSH port.
I checked the /tmp/rules.debug:91 and there it was:
block in log quick proto tcp from <sshguard> to (self) port 2 tracker 1000000301 label "sshguard"
I tried to save '222' (thought it was chopping the last char off), but no donuts for me. It kept '2' as SSH port.
Also tried to save '33' and got '3'.
It seems to be related somehow to the newer PHP version (changes on some array handling functions which is returning the #1 string's char instead of an array position), but just guessing.
Perhaps the lines below can lead you to the issue, but you guys know the scripts better than me :)
https://github.com/manoelhc/pfsense/blob/master/src/usr/local/www/system_advanced_admin.php#L502
https://github.com/manoelhc/pfsense/blob/master/src/usr/local/www/system_advanced_admin.php#L56
Updated by Jim Pingle about 7 years ago
- Status changed from New to Duplicate
This has already been fixed while addressing another issue, see #8974