[TYPO3-core] RFC: #8588: Admin tools -> User Admin -> List users online broken when [BE][lockIP] is set to < 4

Steffen Kamper steffen at sk-typo3.de
Fri Jul 4 18:19:52 CEST 2008


Hi,

Type: Bugfix

Bugtracker references:
http://bugs.typo3.org/view.php?id=8588

Branches: 4.1, 4.2, trunk

Problem:
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.

Solution:
check if gethostbyaddr() fails with
$hostByAddr = @gethostbyaddr($session['ses_iplock']) ? 
gethostbyaddr($session['ses_iplock']) : $session['ses_iplock'];

Maybe it should be documented better, as setting to 0 is invalid and 
results in 1

vg Steffen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 8588_2.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080704/53119861/attachment.txt 


More information about the TYPO3-team-core mailing list