You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/02/23 23:41:26 UTC

svn commit: r1293000 - /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/security/LocalhostOnly.java

Author: hlship
Date: Thu Feb 23 22:41:26 2012
New Revision: 1293000

URL: http://svn.apache.org/viewvc?rev=1293000&view=rev
Log:
TAP5-1836: Add 0:0:0:0:0:0:0:1 as another recognized value for remoteHost meaning local

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/security/LocalhostOnly.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/security/LocalhostOnly.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/security/LocalhostOnly.java?rev=1293000&r1=1292999&r2=1293000&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/security/LocalhostOnly.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/security/LocalhostOnly.java Thu Feb 23 22:41:26 2012
@@ -1,4 +1,4 @@
-// Copyright 2011 The Apache Software Foundation
+// Copyright 2011, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ import org.apache.tapestry5.services.Req
 import org.apache.tapestry5.services.security.WhitelistAnalyzer;
 
 /**
- * Standard analyzer that places requests from the "localhost", "127.0.0.1", or "0:0:0:0:0:0:0:1%0" onto the white list.
+ * Standard analyzer that places requests from the "localhost", "127.0.0.1", "0:0:0:0:0:0:0:1%0", or :"0:0:0:0:0:0:0:1" onto the white list.
  *
  * @since 5.3
  */
@@ -28,6 +28,6 @@ public class LocalhostOnly implements Wh
     {
         String remoteHost = request.getRemoteHost();
 
-        return remoteHost.equals("localhost") || remoteHost.equals("127.0.0.1") || remoteHost.equals("0:0:0:0:0:0:0:1%0");
+        return remoteHost.equals("localhost") || remoteHost.equals("127.0.0.1") || remoteHost.equals("0:0:0:0:0:0:0:1%0") || remoteHost.equals("0:0:0:0:0:0:0:1");
     }
 }