Admin tools -> User Admin -> List users online broken when [BE][lockIP] is set to < 4
I've set [BE][lockIP] to 0. Then Admin tools -> User Admin -> List users online is broken:
Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address in /typo3_src-4.2.0/typo3/sysext/beuser/mod/index.php on line 1558
In the column "host", the IP adress is shown truncated (see attached screenshot).
Furthermore the drop down list to get back to Compare User Settings is inaccessibile then.
A similar error occurs in TYPO 4.1.x
(issue imported from #M8588)
#1 Updated by Steffen Kamper over 12 years ago
[BE][lockIP] is per default 4. this means in usersession the ip is saved in 4 parts
you can reduce this info by [BE][lockIP] , but valid is only 1-4
Your setting 0 will be changed to 1 and saves only aaa
Ok, the error- here this only works with 4 parts, so it has to be fixed like
$hostByAddr = @gethostbyaddr($session['ses_iplock']) ? gethostbyaddr($session['ses_iplock']) : '';
$hostName = ($session['ses_iplock'] != '[DISABLED]' ? $hostByAddr : '[DISABLED]');