Fileman: fix path which is not on document root
Dieser Commit ist enthalten in:
Ursprung
17eeefe21f
Commit
2ddb643508
@ -1,5 +1,5 @@
|
||||
{
|
||||
"FILES_ROOT": "/out/pictures/wysiwigpro",
|
||||
"FILES_ROOT": "out/pictures/wysiwigpro",
|
||||
"RETURN_URL_PREFIX": "",
|
||||
"SESSION_PATH_KEY": "",
|
||||
"THUMBS_VIEW_WIDTH": "140",
|
||||
|
@ -89,7 +89,7 @@ function verifyPath(string $path): void
|
||||
|
||||
function fixPath(string $path): string
|
||||
{
|
||||
$path = $_SERVER['DOCUMENT_ROOT'] . '/' . $path;
|
||||
$path = dirname($_SERVER['SCRIPT_FILENAME']) . '/../../../../../../' . $path;
|
||||
$path = str_replace('\\', '/', $path);
|
||||
$path = RoxyFile::FixPath($path);
|
||||
return $path;
|
||||
@ -389,7 +389,7 @@ class RoxyFile
|
||||
public static function FixPath(string $path): string
|
||||
{
|
||||
$path = (string) mb_ereg_replace('[\\\/]+', '/', $path);
|
||||
$path = (string) mb_ereg_replace('\.\.\/', '', $path);
|
||||
//$path = (string) mb_ereg_replace('\.\.\/', '', $path);
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren