当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > FCKeditor.Net_2.2安全修正版

ASP.NET
asp.net 数据库的连接和datatable类
代码实现打印功能(asp.net+javascript)
asp.net 读取xml文件里面的内容,绑定到dropdownlist中
asp.net 执行事务代码
asp.net 对中文汉字的加密与解密代码
asp.net 下载文件时输出文件内容
asp.net TextBox控件设置ReadOnly后,不能回传。
c# 执行事务函数代码
asp.net 面试 笔试题目[附答案]
asp.net利用google的api做翻译
asp.ne去除html的函数代码
C# 添加图片水印类实现代码
Silverlight融合ajax实现前后台数据交互
mssql 存储过程调用C#编写的DLL文件
asp.net 需要登陆的网站上下载网页源代码和文件
asp.net cookie的操作,写入、读取与操作
asp.net textarea换行函数代码
.NET发起web请求时维持Session
asp.net 身份验证(最简单篇)
asp.net 身份验证(分目录验证篇)

ASP.NET 中的 FCKeditor.Net_2.2安全修正版


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-11   浏览: 116 ::
收藏到网摘: n/a

FCKeditor为一开源多功能在线Web编辑器。官方网站:http://www.fckeditor.net/
相关安全文件参看:
《在.net中使用Fckeditor》 http://cliffever.cnblogs.com/archive/2006/05/09/395134.aspx
《FCKeditor 實戰技巧》http://www.ruanchen.com/"http://www.lvjiyong.com/item/fckeditor-safe" target=_blank>http://www.lvjiyong.com/item/fckeditor-safe

=======================
FCKeditor 安全问题(只指.Net_2.2版)
上传文件格式验证不严格(只客户端验证)。
FCKeditor目录没有设验证权限。
多余上传文件漏洞。

解决方法:
可以查看修改过的FCKeditor.Net_2.2。
站点下的FCKeditor目录进行安全设置,只允许制定用户角色的用户访问。
将站点下不使用的多余上传文件删除。参看实例testFCKeditor。
FCKeditor.Net_2.2修改部分:
1、FileWorkerBase.cs 添加上传文件扩展名验证函数与属性部分。
使用方法跟设置UserFilesPath类似。
Application["FCKeditor:UploadDeniedExtensions"]
Session["FCKeditor:UploadDeniedExtensions"]
System.Configuration.ConfigurationSettings.AppSettings["FCKeditor:UploadDeniedExtensions"]
可以参看实例testFCKeditor。
UserFilesPath属性配置部分"FCKeditor:UserFilesPath"可以设置成"虚拟站点目录"(类似与修改后的BasePath设置)。
2、Uploader.cs
3、FileBrowserConnector.cs
以上两文件增加对上传文件类型的验证。
4、FCKeditor.cs 文件BasePath属性默认为"~/FCKeditor/" 。
注:
FredCK.FCKeditorV2.dll配件为DotNet 2.0配件。
本修改部分在ASP.NET 2.0下调试通过。
下载文件 下载此文件