`

没事儿抄一个 - FckEditor的上传、链接

阅读更多

fckeditor上传目录,根据登陆用户不同,显示的文件夹路径也不同。

 

版本是2.3 for java,几年了,虽然有点老,但很好用。

 

附上代码

 

<!-- FCKEditor -->
	<servlet>
		<servlet-name>Connector</servlet-name>
		<servlet-class>org.dy.ext.web.fckeditor.IncrexConnectorServlet</servlet-class>
		<init-param>
			<param-name>baseDir</param-name>
			<param-value>/userfiles/</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>false</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet>
		<servlet-name>SimpleUploader</servlet-name>
		<servlet-class>org.dy.ext.web.fckeditor.IncrexUploaderServlet</servlet-class>
		<init-param>				
			<param-name>baseDir</param-name>
			<param-value>/userfiles/</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>false</param-value>
		</init-param>
		<init-param>				
			<param-name>enabled</param-name>
			<param-value>true</param-value>
		</init-param>
		<init-param>				
			<param-name>maxSize</param-name>
			<param-value>1024</param-value>
		</init-param>
		
		<init-param>
			<param-name>AllowedExtensionsFile</param-name>
			<param-value></param-value>
		</init-param>
		<init-param>
			
			<param-name>DeniedExtensionsFile</param-name>
			<param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>
		</init-param>
		<init-param>
			<param-name>AllowedExtensionsImage</param-name>
			<param-value>jpg|gif|jpeg|png|bmp</param-value>
		</init-param>
		<init-param>
			<param-name>DeniedExtensionsImage</param-name>
			<param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>
		</init-param>
		<init-param>
			<param-name>AllowedExtensionsFlash</param-name>
			<param-value>swf|fla</param-value>
		</init-param>
		<init-param>
			<param-name>DeniedExtensionsFlash</param-name>
			<param-value></param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>Connector</servlet-name>
		<url-pattern>/crud/editor/fckeditor/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
	</servlet-mapping>
  
	<servlet-mapping>
		<servlet-name>SimpleUploader</servlet-name>
		<url-pattern>/crud/editor/fckeditor/editor/filemanager/upload/simpleuploader</url-pattern>
	</servlet-mapping>  
	<!-- FCKEditor -->

 

Java代码

 

/*
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
 * 
 * == BEGIN LICENSE ==
 * 
 * Licensed under the terms of any of the following licenses at your
 * choice:
 * 
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 * 
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 * 
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 * 
 * == END LICENSE ==
 */
package org.dy.ext.web.fckeditor;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
import org.dy.util.IOHelper;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

import com.cisee.increx.base.auth.UserBean;
import com.cisee.increx.base.auth.web.AuthAction;

/**
 * Servlet to upload and browse files.<br>
 * 
 * This servlet accepts 4 commands used to retrieve and create files and folders
 * from a server directory. The allowed commands are:
 * <ul>
 * <li>GetFolders: Retrive the list of directory under the current folder
 * <li>GetFoldersAndFiles: Retrive the list of files and directory under the
 * current folder
 * <li>CreateFolder: Create a new directory under the current folder
 * <li>FileUpload: Send a new file to the server (must be sent with a POST)
 * </ul>
 * 
 * @author Simone Chiaretta (simo@users.sourceforge.net)
 */

public class IncrexConnectorServlet extends HttpServlet {

	private static String baseDir;
	private static String srcBaseDir;
	
	private static boolean debug = false;

	/**
	 * Initialize the servlet.<br>
	 * Retrieve from the servlet configuration the "baseDir" which is the root
	 * of the file repository:<br>
	 * If not specified the value of "/UserFiles/" will be used.
	 * 
	 */
	public void init() throws ServletException {
		baseDir = getInitParameter("baseDir");
		debug = (new Boolean(getInitParameter("debug"))).booleanValue();
		if (baseDir == null)
			baseDir = "/userfiles/";
		srcBaseDir = baseDir;
		
		String realBaseDir = getServletContext().getRealPath(baseDir);
		File baseFile = new File(realBaseDir);
		if (!baseFile.exists()) {
			try {
				IOHelper.createDirectoryTreeForFolder(realBaseDir);
			} catch (IOException e) {
//				e.printStackTrace();
			}
		}
	}

	/**
	 * Manage the Get requests (GetFolders, GetFoldersAndFiles, CreateFolder).<br>
	 * 
	 * The servlet accepts commands sent in the following format:<br>
	 * connector?Command=CommandName&Type=ResourceType&CurrentFolder=FolderPath<br>
	 * <br>
	 * It execute the command and then return the results to the client in XML
	 * format.
	 * 
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		// Authorization need login first
		UserBean user = AuthAction.getUserStatusBean(request);
		if(user == null){
			System.out.println("Not login yet for : " + request.getRemoteHost());
			throw new ServletException("Need login first!");
		}else{
			// change upload directory by enterprisecode and userid
			// eg. /userfiles/xiao/2/
			this.baseDir = srcBaseDir + user.getEnterprisecode() + "/" + user.getUid() + "/";
			String realBaseDir = getServletContext().getRealPath(baseDir);
			File baseFile = new File(realBaseDir);
			if (!baseFile.exists()) {
				try {
					IOHelper.createDirectoryTreeForFolder(realBaseDir);
				} catch (IOException e) {
//					e.printStackTrace();
				}
			}
		}

		if (debug)
			System.out.println("--- BEGIN DOGET ---");

		response.setContentType("text/xml; charset=UTF-8");
		response.setHeader("Cache-Control", "no-cache");
		PrintWriter out = response.getWriter();

		String commandStr = request.getParameter("Command");
		String typeStr = request.getParameter("Type");
		String currentFolderStr = request.getParameter("CurrentFolder");

		String currentPath = baseDir + typeStr + currentFolderStr;
		String currentDirPath = getServletContext().getRealPath(currentPath);

		File currentDir = new File(currentDirPath);
		if (!currentDir.exists()) {
			try {
				IOHelper.createDirectoryTreeForFolder(currentDirPath);
			} catch (IOException e) {
//				e.printStackTrace();
			}
		}

		Document document = null;
		try {
			DocumentBuilderFactory factory = DocumentBuilderFactory
					.newInstance();
			DocumentBuilder builder = factory.newDocumentBuilder();
			document = builder.newDocument();
		} catch (ParserConfigurationException pce) {
			pce.printStackTrace();
		}

		Node root = CreateCommonXml(document, commandStr, typeStr,
				currentFolderStr, request.getContextPath() + currentPath);

		if (debug)
			System.out.println("Command = " + commandStr);

		if (commandStr.equals("GetFolders")) {
			getFolders(currentDir, root, document);
		} else if (commandStr.equals("GetFoldersAndFiles")) {
			getFolders(currentDir, root, document);
			getFiles(currentDir, root, document);
		} else if (commandStr.equals("CreateFolder")) {
			String newFolderStr = request.getParameter("NewFolderName");
			File newFolder = new File(currentDir, newFolderStr);
			String retValue = "110";

			if (newFolder.exists()) {
				retValue = "101";
			} else {
				try {
					boolean dirCreated = newFolder.mkdir();
					if (dirCreated)
						retValue = "0";
					else
						retValue = "102";
				} catch (SecurityException sex) {
					retValue = "103";
				}

			}
			setCreateFolderResponse(retValue, root, document);
		}

		document.getDocumentElement().normalize();
		try {
			TransformerFactory tFactory = TransformerFactory.newInstance();
			Transformer transformer = tFactory.newTransformer();

			DOMSource source = new DOMSource(document);

			StreamResult result = new StreamResult(out);
			transformer.transform(source, result);

			if (debug) {
				StreamResult dbgResult = new StreamResult(System.out);
				transformer.transform(source, dbgResult);
				System.out.println("");
				System.out.println("--- END DOGET ---");
			}

		} catch (Exception ex) {
			ex.printStackTrace();
		}
		
		out.flush();
		out.close();
		
		baseDir = srcBaseDir;
	}

	/**
	 * Manage the Post requests (FileUpload).<br>
	 * 
	 * The servlet accepts commands sent in the following format:<br>
	 * connector?Command=FileUpload&Type=ResourceType&CurrentFolder=FolderPath<br>
	 * <br>
	 * 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)
			throws ServletException, IOException {
		
		// Authorization need login first
		UserBean user = AuthAction.getUserStatusBean(request);
		if(user == null){
			System.out.println("Not login yet for : " + request.getRemoteHost());
			throw new ServletException("Need login first!");
		}else{
			// change upload directory by enterprisecode and userid
			// eg. /userfiles/xiao/2/
			this.baseDir = srcBaseDir + user.getEnterprisecode() + "/" + user.getUid() + "/";
			String realBaseDir = getServletContext().getRealPath(baseDir);
			File baseFile = new File(realBaseDir);
			if (!baseFile.exists()) {
				try {
					IOHelper.createDirectoryTreeForFolder(realBaseDir);
				} catch (IOException e) {
//					e.printStackTrace();
				}
			}
		}

		if (debug)
			System.out.println("--- BEGIN DOPOST ---");

		response.setContentType("text/html; charset=UTF-8");
		response.setHeader("Cache-Control", "no-cache");
		PrintWriter out = response.getWriter();

		String commandStr = request.getParameter("Command");
		String typeStr = request.getParameter("Type");
		String currentFolderStr = request.getParameter("CurrentFolder");

		String currentPath = baseDir + typeStr + currentFolderStr;
		String currentDirPath = getServletContext().getRealPath(currentPath);

		if (debug)
			System.out.println(currentDirPath);

		String retVal = "0";
		String newName = "";

		if (!commandStr.equals("FileUpload"))
			retVal = "203";
		else {
			DiskFileUpload upload = new DiskFileUpload();
			try {
				List items = upload.parseRequest(request);

				Map fields = new HashMap();

				Iterator iter = items.iterator();
				while (iter.hasNext()) {
					FileItem item = (FileItem) iter.next();
					if (item.isFormField())
						fields.put(item.getFieldName(), item.getString());
					else
						fields.put(item.getFieldName(), item);
				}
				FileItem uplFile = (FileItem) fields.get("NewFile");
				String fileNameLong = uplFile.getName();
				fileNameLong = fileNameLong.replace('\\', '/');
				String[] pathParts = fileNameLong.split("/");
				String fileName = pathParts[pathParts.length - 1];

				String nameWithoutExt = getNameWithoutExtension(fileName);
				String ext = getExtension(fileName);
				File pathToSave = new File(currentDirPath, fileName);
				int counter = 1;
				while (pathToSave.exists()) {
					newName = nameWithoutExt + "(" + counter + ")" + "." + ext;
					retVal = "201";
					pathToSave = new File(currentDirPath, newName);
					counter++;
				}
				uplFile.write(pathToSave);
			} catch (Exception ex) {
				retVal = "203";
			}

		}
		

		out.println("<script type=\"text/javascript\">");
		out.println("window.parent.frames['frmUpload'].OnUploadCompleted("
				+ retVal + ",'" + newName + "');");
		out.println("</script>");
		out.flush();
		out.close();

		baseDir = srcBaseDir;
		if (debug)
			System.out.println("--- END DOPOST ---");

	}

	private void setCreateFolderResponse(String retValue, Node root,
			Document doc) {
		Element myEl = doc.createElement("Error");
		myEl.setAttribute("number", retValue);
		root.appendChild(myEl);
	}

	private void getFolders(File dir, Node root, Document doc) {
		Element folders = doc.createElement("Folders");
		root.appendChild(folders);
		File[] fileList = dir.listFiles();
		for (int i = 0; i < fileList.length; ++i) {
			if (fileList[i].isDirectory()) {
				Element myEl = doc.createElement("Folder");
				myEl.setAttribute("name", fileList[i].getName());
				folders.appendChild(myEl);
			}
		}
	}

	private void getFiles(File dir, Node root, Document doc) {
		Element files = doc.createElement("Files");
		root.appendChild(files);
		File[] fileList = dir.listFiles();
		for (int i = 0; i < fileList.length; ++i) {
			if (fileList[i].isFile()) {
				Element myEl = doc.createElement("File");
				myEl.setAttribute("name", fileList[i].getName());
				myEl.setAttribute("size", "" + fileList[i].length() / 1024);
				files.appendChild(myEl);
			}
		}
	}

	private Node CreateCommonXml(Document doc, String commandStr,
			String typeStr, String currentPath, String currentUrl) {

		Element root = doc.createElement("Connector");
		doc.appendChild(root);
		root.setAttribute("command", commandStr);
		root.setAttribute("resourceType", typeStr);

		Element myEl = doc.createElement("CurrentFolder");
		myEl.setAttribute("path", currentPath);
		myEl.setAttribute("url", currentUrl);
		root.appendChild(myEl);

		return root;

	}

	/*
	 * This method was fixed after Kris Barnhoorn (kurioskronic) submitted SF
	 * bug #991489
	 */
	private static String getNameWithoutExtension(String fileName) {
		return fileName.substring(0, fileName.lastIndexOf("."));
	}

	/*
	 * This method was fixed after Kris Barnhoorn (kurioskronic) submitted SF
	 * bug #991489
	 */
	private String getExtension(String fileName) {
		return fileName.substring(fileName.lastIndexOf(".") + 1);
	}

}

 

/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * File Name: SimpleUploaderServlet.java
 * 	Java File Uploader class.
 * 
 * Version:  2.3
 * Modified: 2005-08-11 16:29:00
 * 
 * File Authors:
 * 		Simone Chiaretta (simo@users.sourceforge.net)
 */

package org.dy.ext.web.fckeditor;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
import org.dy.util.IOHelper;

import com.cisee.increx.base.auth.UserBean;
import com.cisee.increx.base.auth.web.AuthAction;

/**
 * Servlet to upload files.<br>
 * 
 * This servlet accepts just file uploads, eventually with a parameter
 * specifying file type
 * 
 * @author Simone Chiaretta (simo@users.sourceforge.net)
 */

public class IncrexUploaderServlet extends HttpServlet {

	private static final int DEFAULT_MAX_SIZE = 1024*1024;

	private static String baseDir;
	private static String srcBaseDir;

	private static boolean debug = false;

	private static boolean enabled = false;

	private static Hashtable allowedExtensions;

	private static Hashtable deniedExtensions;

	private static String encoding;
	
	private static int maxSize;

	/**
	 * Initialize the servlet.<br>
	 * Retrieve from the servlet configuration the "baseDir" which is the root
	 * of the file repository:<br>
	 * If not specified the value of "/UserFiles/" will be used.<br>
	 * Also it retrieve all allowed and denied extensions to be handled.
	 * 
	 */
	public void init() throws ServletException {

		debug = (new Boolean(getInitParameter("debug"))).booleanValue();

		if (debug)
			System.out.println("\r\n---- SimpleUploaderServlet initialization started ----");

		baseDir = getInitParameter("baseDir");
		enabled = (new Boolean(getInitParameter("enabled"))).booleanValue();
		if (baseDir == null)
			baseDir = "/userfiles/";
		srcBaseDir = baseDir;
		
		encoding = getInitParameter("encoding");
		if (encoding == null)
			encoding = "utf-8";
		String maxSizeString = getInitParameter("maxSize");
		if(maxSizeString != null)
			maxSize = 1024*Integer.parseInt(maxSizeString);
		else
			maxSize = DEFAULT_MAX_SIZE;
		String realBaseDir = getServletContext().getRealPath(baseDir);
		File baseFile = new File(realBaseDir);
		if (!baseFile.exists()) {
			try {
				IOHelper.createDirectoryTreeForFolder(realBaseDir);
			} catch (IOException e) {
//				e.printStackTrace();
			}
		}

		allowedExtensions = new Hashtable(3);
		deniedExtensions = new Hashtable(3);

		allowedExtensions.put("File",
				stringToArrayList(getInitParameter("AllowedExtensionsFile")));
		deniedExtensions.put("File",
				stringToArrayList(getInitParameter("DeniedExtensionsFile")));

		allowedExtensions.put("Image",
				stringToArrayList(getInitParameter("AllowedExtensionsImage")));
		deniedExtensions.put("Image",
				stringToArrayList(getInitParameter("DeniedExtensionsImage")));

		allowedExtensions.put("Flash",
				stringToArrayList(getInitParameter("AllowedExtensionsFlash")));
		deniedExtensions.put("Flash",
				stringToArrayList(getInitParameter("DeniedExtensionsFlash")));

		if (debug)
			System.out
					.println("---- SimpleUploaderServlet initialization completed ----\r\n");

	}

	/**
	 * Manage the Upload requests.<br>
	 * 
	 * The servlet accepts commands sent in the following format:<br>
	 * simpleUploader?Type=ResourceType<br>
	 * <br>
	 * 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)
			throws ServletException, IOException {
		// Authorization need login first
		UserBean user = AuthAction.getUserStatusBean(request);
		if(user == null){
			System.out.println("Not login yet for : " + request.getRemoteHost());
			throw new ServletException("Need login first!");
		}else{
			// change upload directory by enterprisecode and userid
			// eg. /userfiles/xiao/2/
			this.baseDir = srcBaseDir +  user.getEnterprisecode() + "/" + user.getUid() + "/";
		}

		if (debug)
			System.out.println("--- BEGIN DOPOST ---");

		response.setContentType("text/html; charset=" + encoding);
		response.setHeader("Cache-Control", "no-cache");
		PrintWriter out = response.getWriter();

		String typeStr = request.getParameter("Type");
		if (typeStr == null)
			typeStr = "File";

		String currentPath = baseDir + typeStr;
		String currentDirPath = getServletContext().getRealPath(currentPath);
		currentPath = request.getContextPath() + currentPath;

		if (debug)
			System.out.println(currentDirPath);

		String retVal = "0";
		String newName = "";
		String fileUrl = "";
		String errorMessage = "";

		if (enabled) {
			DiskFileUpload upload = new DiskFileUpload();
			upload.setFileSizeMax(maxSize);
			try {
				List items = upload.parseRequest(request);

				Map fields = new HashMap();

				Iterator iter = items.iterator();
				while (iter.hasNext()) {
					FileItem item = (FileItem) iter.next();
					if (item.isFormField())
						fields.put(item.getFieldName(), item.getString());
					else
						fields.put(item.getFieldName(), item);
				}
				FileItem uplFile = (FileItem) fields.get("NewFile");
				String fileNameLong = uplFile.getName();
				fileNameLong = fileNameLong.replace('\\', '/');
				String[] pathParts = fileNameLong.split("/");
				String fileName = pathParts[pathParts.length - 1];

				String nameWithoutExt = getNameWithoutExtension(fileName);
				String ext = getExtension(fileName);
				File pathToSave = new File(currentDirPath, fileName);
				fileUrl = currentPath + "/" + fileName;
				if (extIsAllowed(typeStr, ext)) {
					int counter = 1;
					while (pathToSave.exists()) {
						newName = nameWithoutExt + "(" + counter + ")" + "."
								+ ext;
						fileUrl = currentPath + "/" + newName;
						retVal = "201";
						pathToSave = new File(currentDirPath, newName);
						counter++;
					}
					uplFile.write(pathToSave);
				} else {
					retVal = "202";
					errorMessage = "";
					if (debug)
						System.out.println("Invalid file type: " + ext);
				}
			} catch (Exception ex) {
				if (debug)
					ex.printStackTrace();
				retVal = "203";
			}
		} else {
			retVal = "1";
			errorMessage = "This file uploader is disabled. Please check the WEB-INF/web.xml file";
		}

		out.println("<script type=\"text/javascript\">");
		out.println("window.parent.OnUploadCompleted(" + retVal + ",'"
				+ fileUrl + "','" + newName + "','" + errorMessage + "');");
		out.println("</script>");
		out.flush();
		out.close();

		if (debug)
			System.out.println("--- END DOPOST ---");

		baseDir = srcBaseDir;
	}

	/*
	 * This method was fixed after Kris Barnhoorn (kurioskronic) submitted SF
	 * bug #991489
	 */
	private static String getNameWithoutExtension(String fileName) {
		return fileName.substring(0, fileName.lastIndexOf("."));
	}

	/*
	 * This method was fixed after Kris Barnhoorn (kurioskronic) submitted SF
	 * bug #991489
	 */
	private String getExtension(String fileName) {
		return fileName.substring(fileName.lastIndexOf(".") + 1);
	}

	/**
	 * Helper function to convert the configuration string to an ArrayList.
	 */

	private ArrayList stringToArrayList(String str) {

		if (debug)
			System.out.println(str);
		String[] strArr = str.split("\\|");

		ArrayList tmp = new ArrayList();
		if (str.length() > 0) {
			for (int i = 0; i < strArr.length; ++i) {
				if (debug)
					System.out.println(i + " - " + strArr[i]);
				tmp.add(strArr[i].toLowerCase());
			}
		}
		return tmp;
	}

	private String stringFromParam(String str) {
		return str.replace("|", ",");
	}

	/**
	 * Helper function to verify if a file extension is allowed or not allowed.
	 */

	private boolean extIsAllowed(String fileType, String ext) {

		ext = ext.toLowerCase();

		ArrayList allowList = (ArrayList) allowedExtensions.get(fileType);
		ArrayList denyList = (ArrayList) deniedExtensions.get(fileType);

		if (allowList.size() == 0)
			if (denyList.contains(ext))
				return false;
			else
				return true;

		if (denyList.size() == 0)
			if (allowList.contains(ext))
				return true;
			else
				return false;

		return false;
	}

}
 
分享到:
评论

相关推荐

    FCKeditor文件上传漏洞及利用-File-Upload-Vulnerability-in-FCKEditor1

    其中,PHP上传模块存在一个安全问题,使得远程攻击者能够规避文件类型检查。这一漏洞是在进行网站审计工作时发现的,影响FCKeditor版本2.6.4及以下。 **二、介绍** FCKeditor的创始人是Frederico Caldeira Knabben...

    PGV-Module-fckeditor-4.2

    "4.2"是FCKeditor的一个版本号,意味着这个模块使用的是FCKeditor的4.2版本。 FCKeditor 4.2是FCKeditor系列的一个重要里程碑,它在前一版本的基础上进行了多项改进和优化。其中,最重要的改进之一是增强了对HTML5...

    ext-fckeditor整合

    而FCKeditor则是一个开源的在线文本编辑器,允许用户在网页上进行类似桌面文本编辑器的文本编辑操作。 标题“ext-fckeditor整合”指的是将EXT框架与FCKeditor集成到一起,以创建一个具有高级文本编辑功能的EXT应用...

    JSP-FCKEditor 源码

    总之,JSP-FCKEditor是一个强大且易于集成的网页编辑器解决方案,其丰富的功能和灵活性使其在Web开发中有着广泛的应用。理解并掌握其原理和使用方法,对于提升用户体验和提高工作效率具有重要意义。

    zk-FCKeditor-2.5.1_1.zip

    标题中的"zk-FCKeditor-2.5.1_1.zip"表明这是一个关于ZK框架与FCKeditor集成的版本2.5.1_1的压缩包文件。ZK是一个基于Java的开源用户界面框架,专门用于构建富互联网应用程序(RIA)。而FCKeditor则是一个著名的...

    博客附件--fckeditor

    - **富文本编辑**:它提供了一个类似 Microsoft Word 的界面,允许用户添加文本、格式化文本、插入图片、链接、表格、列表等元素,极大地提高了网页内容的编辑效率。 - **插件扩展**:FCKeditor 提供了丰富的插件...

    grails 中文文档+grails-fckeditor-0.9.5.zip插件

    2. 使用方法:在GSP页面中引入FCKEditor,用户可以在网页上直接编辑富文本,如HTML代码,支持图片上传、链接插入等功能。 3. 扩展性:FCKEditor插件可以与其他Grails插件(如文件上传插件)配合使用,提供更强大的...

    Java-Fckeditor的使用

    总结,Java-Fckeditor是一个强大且易用的富文本编辑组件,它能够为Web应用提供丰富的文本编辑功能。通过合理集成和配置,FCKeditor能够满足各种项目的需求,提升用户的编辑体验。在实际应用中,开发者应关注其与后端...

    t5-easy-fckeditor-1.0.4.zip_EasyF_easy

    【标题】"t5-easy-fckeditor-1.0.4.zip_EasyF_easy" 提供的信息表明,这是一个关于T5框架与FCKeditor集成的简易版本,版本号为1.0.4。FCKeditor是一款流行的开源文本编辑器,常用于网页内容管理系统,它允许用户在...

    最新的ckeditor 富文本-FCKEditor控件

    最新的ckeditor 富文本-FCKEditor控件,最新的ckeditor 富文本-FCKEditor控件,属于第三方控件,功能齐全,完善,大部分的ASP.NET开发的网站都需要富文本控件,欢迎大家交流心得~

    FCKeditor漏洞总结

    - **4.2**:通过上传多个文件(如`shell.php`和另一个伪装文件)来实现攻击,在某些情况下,即使上传了看似无害的文件也能成功执行恶意代码。 ##### 5. 目录遍历漏洞 - **描述**:通过构造特定的URL,攻击者能够...

    ext-fckeditor

    标题中的"ext-fckeditor"指的是基于Java开发的一个项目,它集成了Ext库和FCKeditor。这个项目的主要目的是为开发者提供一个完整的、可运行的源代码解决方案,以便于在Java环境中集成富文本编辑器功能。 Ext是一个...

    网站开发工具模块-FCKEditor

    FCKeditor 2.6.3是该编辑器的一个较早版本,随着时间的推移,开发者可能会遇到一些安全更新和新功能的需求。为了保持网站的安全性和用户体验,建议定期关注CKEditor的官方更新,适时升级到最新版本,比如CKEditor 4...

    FCKeditor的相关资源fckeditor-java-2.6-bin,fckeditor-java-2.6-src,fckeditor-2.6.6

    版本号2.6.6意味着这是FCKeditor的一个稳定版本,可能包含了一些错误修复和性能优化。在Web应用中,通常会将这些前端资源部署到Web服务器,让用户在浏览器中直接使用。 4. **fckeditor-java-demo-2.6.war**: 这是一...

    FCKEDITOR 常用上传方法

    以下是关于FCKEditor上传方法的详细说明: 1. **表单提交上传** 在FCKEditor 2.2版本中,文件上传通常通过HTML表单实现。例如: ```html &lt;form id="frmUpload" enctype="multipart/form-data" action=...

    fckeditor-java-2.6-bin

    **FCKeditor for Java 2.6:一个强大的文本编辑组件** FCKeditor是一款流行的开源文本编辑器,专为Web应用程序设计,支持多种编程语言,包括Java。在本例中,我们关注的是"Fckeditor-java-2.6-bin",这是一个针对...

    fckeditor-java-2.6-src

    FCKeditor是一款强大的开源文本编辑器,主要用于网页和应用程序中的富文本输入。...对于初学者来说,这是一个很好的学习富文本编辑器与Java集成的起点;对于有经验的开发者,源码则提供了自定义和优化FCKeditor的可能。

    基于Java Web的HTML在线文本编辑器解决方案——以FckEditor在线编辑器为例.pdf

    FckEditor提供了文本样式编辑、图片上传下载和附件上传下载等功能,为网络文本交互提供了强大支持。 知识点3:FckEditor在线编辑器在Java Web开发中的配置 --------------------------------------------- ...

    fckeditor-java-2.4.1-bin

    "Fckeditor-java-2.4.1-bin"是一个用于Java平台的富文本编辑器软件包,主要功能是为Web应用程序提供一个强大的在线文本编辑工具。FCKeditor是一款开源的JavaScript库,它允许用户在网页上创建类似桌面应用的文本编辑...

Global site tag (gtag.js) - Google Analytics