Bug #18895
closedAdmin tools -> User Admin -> List users online broken when [BE][lockIP] is set to < 4
0%
Description
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)
Files
Updated by Steffen Kamper over 16 years ago
first:
[BE][lockIP] is per default 4. this means in usersession the ip is saved in 4 parts
aaa.bbb.ccc.ddd
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]');
Updated by Steffen Kamper over 16 years ago
i've changed minimal, as if gethostbyaddr fails, i show now $session['ses_iplock'] instead of empty (use other section if want to hide)