You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/04/26 15:42:42 UTC
svn commit: r938048 - in
/myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test:
DirectoryBrowser.java Filter.java
Author: lofwyr
Date: Mon Apr 26 13:42:42 2010
New Revision: 938048
URL: http://svn.apache.org/viewvc?rev=938048&view=rev
Log:
ignoring .svn dirs
Modified:
myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/DirectoryBrowser.java
myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Filter.java
Modified: myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/DirectoryBrowser.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/DirectoryBrowser.java?rev=938048&r1=938047&r2=938048&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/DirectoryBrowser.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/DirectoryBrowser.java Mon Apr 26 13:42:42 2010
@@ -56,10 +56,12 @@ public class DirectoryBrowser {
if (childPath.endsWith("/")) {
// ignore, because weblogic puts the path directory itself in the Set
if (!childPath.equals(path)) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("childPath dir " + childPath);
+ if (Filter.isValid(childPath)) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("childPath dir " + childPath);
+ }
+ locateResourcesInWar(servletContext, list, childPath);
}
- locateResourcesInWar(servletContext, list, childPath);
}
} else {
if (Filter.isValid(childPath)) {
Modified: myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Filter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Filter.java?rev=938048&r1=938047&r2=938048&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Filter.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/test/src/main/java/org/apache/myfaces/tobago/example/test/Filter.java Mon Apr 26 13:42:42 2010
@@ -30,6 +30,7 @@ public class Filter {
private static final Log LOG = LogFactory.getLog(Filter.class);
public static final List<String> ALLOWED = Arrays.asList(
+ ".*\\/",
".*\\.xhtml",
".*\\.jsp",
".*\\.jspx",
@@ -39,6 +40,8 @@ public class Filter {
public static final Set<String> FORBIDDEN = new HashSet<String>(Arrays.asList(
"/META-INF.*",
"/WEB-INF.*",
+ ".*/\\.svn/.*",
+
"/index.html",
"/meta-test/meta-1.*",
"/meta-test/meta-2.*\\.jspx",