Replaced localhost check with the isLoopbackAddress() method, should be IPV6 compatible

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@539 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-04-23 22:41:59 +00:00
parent e263c8e797
commit 0c57b569a3
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ public abstract class AbstractServer extends Thread {
DavGatewayTray.debug(new BundleMessage("LOG_CONNECTION_FROM", clientSocket.getInetAddress(), port));
// only accept localhost connections for security reasons
if (Settings.getBooleanProperty("davmail.allowRemote") ||
clientSocket.getInetAddress().toString().indexOf("127.0.0.1") > 0) {
clientSocket.getInetAddress().isLoopbackAddress()) {
connection = createConnectionHandler(clientSocket);
connection.start();
} else {