View Issue Details

IDProjectCategoryView StatusLast Update
0013810Tine 2.0Tinebasepublic2018-03-29 15:53
ReporterestradisAssigned To 
PrioritylowSeveritytweakReproducibilityalways
Status newResolutionopen 
PlatformVMware Virtual MachineOSUbuntu LinuxOS Version16.04 LTS
Product Versiongit master 
Target VersionFixed in Version 
Summary0013810: Incorrect IP displayed in tine when operating behind reverse proxy
DescriptionTine uses $_SERVER['REMOTE_ADDR'] to identify connected client. When tine is operated behind a reverse proxy, the client ip address will be from the proxy, not from the real client. Although this is technically correct, it makes the column 'Last login from' useless when there is only the address from the reverse proxy displayed. (See screenshot)

Not sure what solution is to recommend, but I'm able to provide a workaround for this issue. (See additional information)
Additional InformationFortunatly there is a quick and dirty workaround possible.

1st:
In php.ini set the following line:
auto_prepend_file = "/usr/share/php/prepend.php"

2nd:
In prepend.php insert the following code:
<?php
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $_SERVER['PROXY_ADDR'] = $_SERVER['REMOTE_ADDR'];
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
};
?>

Now the correct IP address will be displayed in tine.
TagsNo tags attached.
mwticket

Issue History

Date Modified Username Field Change
2018-03-29 15:53 estradis New Issue
2018-03-29 15:53 estradis File Added: 2018-03-29 15_32_59-172.16.30.149 - Tine behind RProxy.png