You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2020/07/19 15:09:21 UTC

[tapestry-5] 01/02: TAP5-2632: slashes in context URLs are not handled properly

This is an automated email from the ASF dual-hosted git repository.

thiagohp pushed a commit to branch java9modules
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git

commit 8fc9d875d2cb6dbaf17b24571a7289a08bdbffd9
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Sat Jul 18 16:16:50 2020 -0300

    TAP5-2632: slashes in context URLs are not handled properly
---
 .../tapestry5/internal/services/assets/ContextAssetRequestHandler.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ContextAssetRequestHandler.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ContextAssetRequestHandler.java
index 75a4b6c..473eded 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ContextAssetRequestHandler.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ContextAssetRequestHandler.java
@@ -35,7 +35,7 @@ public class ContextAssetRequestHandler implements AssetRequestHandler
 
     private final Resource rootContextResource;
 
-    private final Pattern illegal = Pattern.compile("^(((web|meta)-inf.*)|(.*\\.tml$))", Pattern.CASE_INSENSITIVE);
+    private final Pattern illegal = Pattern.compile("^(/*((web|meta)-inf.*)|(.*\\.tml$))", Pattern.CASE_INSENSITIVE);
 
     public ContextAssetRequestHandler(ResourceStreamer resourceStreamer, Resource rootContextResource)
     {