求助CKFinder中CheckAuthentication的权限检测【asp版】
时间:2011-07-24
来源:互联网
这是原来的代码:
function CheckAuthentication()
' 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...
'
' CheckAuthentication = ( Session( "IsAuthorized" ) )
'
' ... where Session( "IsAuthorized" ) is set to "true" as soon as the
' user logs in your system.
'CheckAuthentication = false
CheckAuthentication = true
End function
这样写的话只要输入地址正确,不论是否登录后台都能使用CKFinder上传文件。
这是添加过权限检测的,目的是如果没有通过验证则无法上传:
function CheckAuthentication()
' 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...
'
' CheckAuthentication = ( Session( "IsAuthorized" ) )
'
' ... where Session( "IsAuthorized" ) is set to "true" as soon as the
' user logs in your system.
'CheckAuthentication = false
if Session("admin") <> true then
CheckAuthentication = false
else
CheckAuthentication = true
end if
End function
问题出现了:不论是否登录都提示【因为安全原因,文件不可浏览. 请联系系统管理员并检查CKFinder配置文件。】请教高手给予思路为谢!
function CheckAuthentication()
' 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...
'
' CheckAuthentication = ( Session( "IsAuthorized" ) )
'
' ... where Session( "IsAuthorized" ) is set to "true" as soon as the
' user logs in your system.
'CheckAuthentication = false
CheckAuthentication = true
End function
这样写的话只要输入地址正确,不论是否登录后台都能使用CKFinder上传文件。
这是添加过权限检测的,目的是如果没有通过验证则无法上传:
function CheckAuthentication()
' 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...
'
' CheckAuthentication = ( Session( "IsAuthorized" ) )
'
' ... where Session( "IsAuthorized" ) is set to "true" as soon as the
' user logs in your system.
'CheckAuthentication = false
if Session("admin") <> true then
CheckAuthentication = false
else
CheckAuthentication = true
end if
End function
问题出现了:不论是否登录都提示【因为安全原因,文件不可浏览. 请联系系统管理员并检查CKFinder配置文件。】请教高手给予思路为谢!
作者: gshynnu 发布时间: 2011-07-24
没有人指导一下么?自己顶一个
作者: gshynnu 发布时间: 2011-07-24
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28