Skip to content

Commit

Permalink
[VD:LocalFileSystem] fix #3429 RCE on Windows server
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Nov 1, 2021
1 parent 5796adf commit c08bcbf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions php/elFinderVolumeLocalFileSystem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ public function __construct()
$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\\\:*?"<>|]*$/';
}
}

/*********************************************************************/
Expand Down

0 comments on commit c08bcbf

Please # to comment.