Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 1655)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java	(revision 1656)
@@ -113,10 +113,10 @@
 		XmlResponse xr;
 		
-		if (!SessionDataHandler.isEnabledForFileBrowsing(request))
+		if (!CommandHandler.isValidForGet(commandStr))
+			xr = new XmlResponse(XmlResponse.EN_ERROR,
+					XmlResponse.CM_INVALID_COMMAND);
+		else if (!SessionDataHandler.isEnabledForFileBrowsing(request))
 			xr = new XmlResponse(XmlResponse.EN_ERROR,
 					XmlResponse.CM_NOT_AUTHORIZED);
-		else if (!CommandHandler.isValidForGet(commandStr))
-			xr = new XmlResponse(XmlResponse.EN_ERROR,
-					XmlResponse.CM_INVALID_COMMAND);
 		else if (typeStr != null && !ResourceTypeHandler.isValid(typeStr))
 			xr = new XmlResponse(XmlResponse.EN_ERROR,
@@ -134,9 +134,7 @@
 
 			File typeDir = new File(typeDirPath);
-
 			if (!typeDir.exists()) {
 				typeDir.mkdirs();
-				// FIXME log typePath or typeDirPath???
-				logger.debug("Type dir '{}' successfully created", typePath);
+				logger.debug("Type dir '{}' successfully created", typeDirPath);
 			}
 
@@ -191,5 +189,4 @@
 	 * It store the file (renaming it in case a file with the same name exists) and then return an
 	 * HTML file with a javascript command in it.
-	 * 
 	 */
 	public void doPost(HttpServletRequest request, HttpServletResponse response)
@@ -232,5 +229,5 @@
 		        || Utils.isEmpty(typeStr))
 			ur = UploadResponse.UR_BAD_REQUEST;
-		else if (!commandStr.matches("(File|Quick)Upload"))
+		else if (!CommandHandler.isValidForPost(commandStr))
 			ur = UploadResponse.UR_SECURITY_ERROR;
 		else if (!UtilsFile.isValidPath(currentFolderStr)) {
