[英]CKFinder 3 - The file browser is disabled for security reasons
我對 CKFIder 很陌生,我收到了錯誤
出於安全原因,文件瀏覽器被禁用。 請聯系您的系統管理員並檢查 CKFinder 配置文件。
我在網站上看了一下,如下所示:
http://ckeditor.com/forums/Support/file-browser-disabled-for-security-reasons 。
http://ckeditor.com/forums/Support/File-browser-disabled
http://ckeditor.com/forums/Support/file-browser-disabled-for-security-reasons 。
他們都在 config.php 文件中提到了一個名為checkAuthentication()
的函數,但我搜索了所有文件,但無法確定該函數。
論壇上所有其他出現相同錯誤的人都使用 CKFinder 2,而我找不到另一個使用 v3 出現錯誤的人
我確實相信它只是我忽略的一些小東西。
提前謝謝
為authentication
返回true
顯然是不安全的。 請查看此處以查看一些展示如何使用此選項的示例。
在查看了 config.php 文件后,我看到了一個配置項$config['authentication']
在我將其設置為return true
,我不再收到錯誤消息。 但不確定這是否是解決問題的最安全/最好的方法
去 ckfinder/config.php
找到以下行
$config['authentication'] = function () {
return false;
};
在這里把假變成真。
$config['authentication'] = function () {
return true;
};
既然是關於 PHP 的,沒有人說 CKFinder for ASP.Net 雖然它與 PHP 的 CKFinder 幾乎相同,無論如何,如果您使用 CKFinder for ASP.Net,並且您剛剛下載它,您應該查找IsAuthenticated()
方法, 在此處提供的示例包中,轉到App_Code
文件夾,然后打開RoleBasedAuthenticator.cs
文件,使其暫時返回 true 而不是 false:
private bool IsAuthenticated(string[] roles)
{
// Should always fail if matcher is empty.
if (_allowedRoleMatcherTemplate == string.Empty)
{
return true;
}
...
轉到ckfinder
文件夾,找到config.php文件,轉到以下行,
$config['authentication'] = function () {
return true;
};
並確保它是 return true
而不是false
。
希望這對你有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.