1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Removed admin-only limitation on system directory downloads.

This commit is contained in:
Cameron
2019-08-16 08:26:53 -07:00
parent 7af965f97d
commit a10e972f88

View File

@@ -1044,7 +1044,7 @@ class e_file
$DOWNLOADS_DIRECTORY = ($DOWNLOADS_DIR[0] == DIRECTORY_SEPARATOR) ? $DOWNLOADS_DIR : e_BASE.$DOWNLOADS_DIR; // support for full path eg. /home/account/folder.
$FILES_DIRECTORY = e_BASE.e107::getFolder('FILES');
$MEDIA_DIRECTORY = realpath(e_MEDIA); // could be image, file or other type.
$SYSTEM_DIRECTORY = realpath(e_SYSTEM); // downloading of logs etc. via browser if required. (Admin-only)
$SYSTEM_DIRECTORY = realpath(e_SYSTEM); // downloading of logs or hidden files etc. via browser if required.
$file = $tp->replaceConstants($file);
@@ -1062,11 +1062,6 @@ class e_file
$path_downloads = realpath($DOWNLOADS_DIRECTORY);
$path_public = realpath($FILES_DIRECTORY."public/");
if(strstr($path, $SYSTEM_DIRECTORY) && !ADMIN)
{
header("location: {$e107->base_path}");
exit();
}
if(!strstr($path, $path_downloads) && !strstr($path,$path_public) && !strstr($path, $MEDIA_DIRECTORY) && !strstr($path, $SYSTEM_DIRECTORY))
{