mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[VD:LocalFileSystem] fix #3429 RCE on Windows server
This commit is contained in:
@@ -81,6 +81,13 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver
|
||||
$this->options['keepTimestamp'] = array('copy', 'move'); // keep timestamp at inner filesystem allowed 'copy', 'move' and 'upload'
|
||||
$this->options['substituteImg'] = true; // support substitute image with dim command
|
||||
$this->options['statCorrector'] = null; // callable to correct stat data `function(&$stat, $path, $statOwner, $volumeDriveInstance){}`
|
||||
if (DIRECTORY_SEPARATOR === '/') {
|
||||
// Linux
|
||||
$this->options['acceptedName'] = '/^[^\.\/\x00][^\/\x00]*$/';
|
||||
} else {
|
||||
// Windows
|
||||
$this->options['acceptedName'] = '/^[^\.\/\x00\\\:*?"<>|][^\/\x00\\\:*?"<>|]*$/';
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user