Merge pull request #1468 from menocar/ip-check

Do not do IP address based user identity check when authentication is activated.
This commit is contained in:
LevelX2 2016-01-13 16:10:39 +01:00
commit b9ed4f4b06

View file

@ -184,8 +184,8 @@ public class Session {
boolean reconnect = false; boolean reconnect = false;
if (user == null) { // user already exists if (user == null) { // user already exists
user = UserManager.getInstance().findUser(userName); user = UserManager.getInstance().findUser(userName);
// TODO: Remove this check since now we do a user authentication. // If authentication is not activated, check the identity using IP address.
if (user.getHost().equals(host)) { if (ConfigSettings.getInstance().isAuthenticationActivated() || user.getHost().equals(host)) {
user.updateLastActivity(null); // minimizes possible expiration user.updateLastActivity(null); // minimizes possible expiration
this.userId = user.getId(); this.userId = user.getId();
if (user.getSessionId().isEmpty()) { if (user.getSessionId().isEmpty()) {