dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20427
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9317: Fixed minor bug with IP detection
------------------------------------------------------------
revno: 9317
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-12-14 10:03:22 +0100
message:
Fixed minor bug with IP detection
modified:
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/listener/AuthenticationListener.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/listener/AuthenticationListener.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/listener/AuthenticationListener.java 2012-11-23 12:51:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/listener/AuthenticationListener.java 2012-12-14 09:03:22 +0000
@@ -77,7 +77,9 @@
WebAuthenticationDetails details = (WebAuthenticationDetails) event.getAuthentication().getDetails();
- userAuditService.registerLoginSuccess( username, details.getRemoteAddress() );
+ String ip = details != null ? details.getRemoteAddress() : "";
+
+ userAuditService.registerLoginSuccess( username, ip );
userService.setLastLogin( username );
}