Changeset 1656
- Timestamp:
- 2008-02-28 16:28:12 (6 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/connector/ConnectorServlet.java
r1647 r1656 113 113 XmlResponse xr; 114 114 115 if (!SessionDataHandler.isEnabledForFileBrowsing(request)) 115 if (!CommandHandler.isValidForGet(commandStr)) 116 xr = new XmlResponse(XmlResponse.EN_ERROR, 117 XmlResponse.CM_INVALID_COMMAND); 118 else if (!SessionDataHandler.isEnabledForFileBrowsing(request)) 116 119 xr = new XmlResponse(XmlResponse.EN_ERROR, 117 120 XmlResponse.CM_NOT_AUTHORIZED); 118 else if (!CommandHandler.isValidForGet(commandStr))119 xr = new XmlResponse(XmlResponse.EN_ERROR,120 XmlResponse.CM_INVALID_COMMAND);121 121 else if (typeStr != null && !ResourceTypeHandler.isValid(typeStr)) 122 122 xr = new XmlResponse(XmlResponse.EN_ERROR, … … 134 134 135 135 File typeDir = new File(typeDirPath); 136 137 136 if (!typeDir.exists()) { 138 137 typeDir.mkdirs(); 139 // FIXME log typePath or typeDirPath??? 140 logger.debug("Type dir '{}' successfully created", typePath); 138 logger.debug("Type dir '{}' successfully created", typeDirPath); 141 139 } 142 140 … … 191 189 * It store the file (renaming it in case a file with the same name exists) and then return an 192 190 * HTML file with a javascript command in it. 193 *194 191 */ 195 192 public void doPost(HttpServletRequest request, HttpServletResponse response) … … 232 229 || Utils.isEmpty(typeStr)) 233 230 ur = UploadResponse.UR_BAD_REQUEST; 234 else if (! commandStr.matches("(File|Quick)Upload"))231 else if (!CommandHandler.isValidForPost(commandStr)) 235 232 ur = UploadResponse.UR_SECURITY_ERROR; 236 233 else if (!UtilsFile.isValidPath(currentFolderStr)) {