Author: hlship
Date: Wed Nov  2 15:35:35 2011
New Revision: 1196634

URL: http://svn.apache.org/viewvc?rev=1196634&view=rev
Log:
Add IPv6 loopback address to LocalhostOnly WhitelistAnalyzer

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=1196634&r1=1196633&r2=1196634&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
 Wed Nov  2 15:35:35 2011
@@ -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" (or 
"127.0.0.1") onto the white list.
+ * 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.
  *
  * @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");
+        return remoteHost.equals("localhost") || 
remoteHost.equals("127.0.0.1") || remoteHost.equals("0:0:0:0:0:0:0:1%0");
     }
 }


Reply via email to