Fix logging of client ip in


While debugging some configuration issues, I came across a problem with
logging, RT 4.4.1 when using external authentication
always logs UNKNOWN as the clients IP address, the attached patch fixes
the issue.

Fixes issue where UNKNOWN is logged as the clients IP address for all
successful logins.

lib/RT/Authen/ | 3 ±-
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/RT/Authen/
index eff73bb…3f82cdc 100644
— a/lib/RT/Authen/
+++ b/lib/RT/Authen/
@@ -444,8 +444,7 @@ sub DoAuth {

          $RT::Logger->info(  "Successful login for",
  •                            "from",
  •                            ($ENV{'REMOTE_ADDR'} || 'UNKNOWN') );
  •                            "from", 

(RT::Interface::Web::RequestENV(‘REMOTE_ADDR’) || ‘UNKNOWN’) );
# Do not delete the session. User stays logged in and
# autohandler will not check the password again

Best Regards

Martin Wheldon
Greenhills IT Ltd.
Telephone: 01904 238 454

Greenhills IT Ltd. is a limited company registered in England and Wales.
Company Registration No: 06387214
Registered Offices: 2 Greenhills, Claxton, YORK, North Yorkshire, YO60