【师太】【大师,老大,大大】, 如何解决 the server didn’t send back a proper xml….
8、在上传文件窗口点击浏览服务器,可能会出现 the server didn’t send back a proper xml….. 错误提示,是因为FCKeditor要求不同类型的文件分别传到不同的目录,包括file,image,falsh,media 等目录,可以先建立起来试试。
FCKEditor.NET 2.6 的安全性配置
文件上传,一直是容易被利用的攻击通道,呵呵,所以这里要重点提一下:
打开 editor/filemanager/connectors/aspx/config.ascx
private bool CheckAuthentication()
{
//为了防止任意用户均可以打开上传页或者浏览服务器文件
//建议将此处和你的后台管理权限进行集成,如果不需要验证,则直接返回 true 即可
//------------------------------------------------
//1. 假设你用 session 存储用户的登录验证信息,假设 session 的 key 为 auth
// 则需要返回
//return (Session["auth"] != null && Session["auth"] == "验证值");
//2. 如果你用 FORM 验证方式,则可以验证
//return Page.User.Identity.IsAuthenticated;
// WARNING : DO NOT simply return "true". By doing so, you are allowing
// "anyone" to upload and list the files in your server. You must implement
// some kind of session validation here. Even something very simple as...
//
//return ( Session[ "IsAuthorized" ] != null && (bool)Session[ "IsAuthorized" ] == true );
//
// ... where Session[ "IsAuthorized" ] is set to "true" as soon as the
// user logs in your system.
return true;
}