geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r498726 - /geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/handler/JettySecurityHandler.java
Date Mon, 22 Jan 2007 18:00:42 GMT
Author: djencks
Date: Mon Jan 22 10:00:41 2007
New Revision: 498726

URL: http://svn.apache.org/viewvc?view=rev&rev=498726
Log:
GERONIMO-2709 escape colons in pathInContext so permission constructor does not get confused

Modified:
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/handler/JettySecurityHandler.java

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/handler/JettySecurityHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/handler/JettySecurityHandler.java?view=diff&rev=498726&r1=498725&r2=498726
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/handler/JettySecurityHandler.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/handler/JettySecurityHandler.java
Mon Jan 22 10:00:41 2007
@@ -180,7 +180,11 @@
             } else {
                 transportType = "NONE";
             }
-            WebUserDataPermission wudp = new WebUserDataPermission(pathInContext, new String[]
{ request.getMethod() }, transportType);
+            String substitutedPathInContext = pathInContext;
+            if (substitutedPathInContext.indexOf("%3A") > -1) substitutedPathInContext
= substitutedPathInContext.replaceAll("%3A", "%3A%3A");
+            if (substitutedPathInContext.indexOf(":") > -1) substitutedPathInContext =
substitutedPathInContext.replaceAll(":", "%3A");
+
+            WebUserDataPermission wudp = new WebUserDataPermission(substitutedPathInContext,
new String[] { request.getMethod() }, transportType);
             WebResourcePermission webResourcePermission = new WebResourcePermission(request);
             Principal user = obtainUser(pathInContext, request, response, webResourcePermission,
wudp);
 



Mime
View raw message