Project

General

Profile

Actions

Bug #18895

closed

Admin tools -> User Admin -> List users online broken when [BE][lockIP] is set to < 4

Added by Peter Kraume over 16 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2008-06-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

typo3_bug.png (32.1 KB) typo3_bug.png Administrator Admin, 2008-06-02 15:08
8588.diff (791 Bytes) 8588.diff Administrator Admin, 2008-07-04 16:17
8588_2.diff (811 Bytes) 8588_2.diff Administrator Admin, 2008-07-04 18:10
Actions #1

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]');

Actions #2

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)

Actions

Also available in: Atom PDF