From 0346b4d4aa1adc19b681232d922a46bd9ec305d1 Mon Sep 17 00:00:00 2001 From: Intersel Date: Fri, 18 Nov 2022 18:08:35 +0100 Subject: [PATCH] use of realpath to resolve properly relative_dir As path directory may be symbolic link in $_SERVER['DOCUMENT_ROOT'], to remove it from $$document_root we need to use realpath to solve correctly the path --- fckeditor/editor/filemanager/connectors/php/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fckeditor/editor/filemanager/connectors/php/config.php b/fckeditor/editor/filemanager/connectors/php/config.php index ac16981d..7e731bcb 100755 --- a/fckeditor/editor/filemanager/connectors/php/config.php +++ b/fckeditor/editor/filemanager/connectors/php/config.php @@ -196,7 +196,7 @@ function setupBasePathsNix() { $dir = preg_replace('/editor\/filemanager\/connectors\/.*/', "$animal/",$dir); $Config['UserFilesAbsolutePath'] = $dir; - $document_root = $_SERVER['DOCUMENT_ROOT']; + $document_root = realpath($_SERVER['DOCUMENT_ROOT']); $relative_dir = str_replace($document_root, "", $dir); $Config['UserFilesPath'] = $relative_dir; }