mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
N°1935: Security hardening
This commit is contained in:
@@ -184,7 +184,7 @@ EOF
|
||||
$sFile = utils::ReadParam('file', '', false, 'raw_data');
|
||||
$oBackup = new DBBackupScheduled();
|
||||
$sBackupDir = APPROOT.'data/backups/';
|
||||
$sPathNoDotDotPattern = '/^((?!\/\.\.\/).)*$/';
|
||||
$sPathNoDotDotPattern = "/^((?![\/\\\\]\.\.[\/\\\\]).)*$/";
|
||||
if(preg_match($sPathNoDotDotPattern, $sBackupDir.$sFile) == 1)
|
||||
{
|
||||
$oBackup->DownloadBackup($sBackupDir.$sFile);
|
||||
|
||||
Reference in New Issue
Block a user