Index: /FCKeditor.Java/branches/2.4.x/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java
===================================================================
--- /FCKeditor.Java/branches/2.4.x/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java	(revision 3874)
+++ /FCKeditor.Java/branches/2.4.x/java-core/src/main/java/net/fckeditor/tool/UtilsFile.java	(revision 3875)
@@ -23,4 +23,5 @@
 import java.io.File;
 import java.io.InputStream;
+import java.util.regex.Pattern;
 
 import javax.servlet.http.HttpServletRequest;
@@ -40,4 +41,7 @@
  */
 public class UtilsFile {
+	
+	protected static final Pattern ILLEGAL_CURRENT_FOLDER_PATTERN = Pattern
+	.compile("^[^/]|[^/]$|/\\.{1,2}|\\\\|\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}");
 	
 	private static final Logger logger = LoggerFactory.getLogger(UtilsFile.class);
@@ -101,22 +105,13 @@
 	 *         <code>false</code>.
 	 */
-    public static boolean isValidPath(final String path) {
-    	if (Utils.isEmpty(path))
-    		return false;
-    	if (!path.startsWith("/"))
-    		return false;
-    	if (!path.endsWith("/"))
-    		return false;
-    	
-    	if (!path.equals(FilenameUtils.separatorsToUnix(FilenameUtils
-    			.normalize(path))))
-    		return false;
-    	
-    	// previous statement handles dot and (back) slash already
-    	if (!path.equals(path.replaceAll("\\||:|\\?|\\*|\"|<|>|\\p{Cntrl}", "_")))
-    		return false;
-    	
-    	return true;
-    }
+	public static boolean isValidPath(final String path) {
+		if (Utils.isEmpty(path))
+			return false;
+
+		if (ILLEGAL_CURRENT_FOLDER_PATTERN.matcher(path).find())
+			return false;
+		
+		return true;
+	}
 
 	/**
Index: /FCKeditor.Java/branches/2.4.x/java-core/src/test/java/net/fckeditor/tool/UtilsFileTest.java
===================================================================
--- /FCKeditor.Java/branches/2.4.x/java-core/src/test/java/net/fckeditor/tool/UtilsFileTest.java	(revision 3874)
+++ /FCKeditor.Java/branches/2.4.x/java-core/src/test/java/net/fckeditor/tool/UtilsFileTest.java	(revision 3875)
@@ -90,4 +90,11 @@
 
 	@Test
+    public void isValidPath00() {
+    	String path = null;
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+	
+	@Test
     public void isValidPath01() {
     	String path = "";
@@ -169,4 +176,11 @@
     public void isValidPath12() {
     	String path = "/\\/";
+    	boolean condition = UtilsFile.isValidPath(path);
+    	assertFalse(condition);
+    }
+	
+	@Test
+    public void isValidPath13() {
+    	String path = "/.hidden/";
     	boolean condition = UtilsFile.isValidPath(path);
     	assertFalse(condition);
