Commit d219d482 authored by Marius Cramer's avatar Marius Cramer

- fixed missing web protection removal on backup restore

parent 4863035e
......@@ -128,6 +128,7 @@ class backup_plugin {
//* Restore a web backup
if($action_name == 'backup_restore' && $backup['backup_type'] == 'web') {
$app->system->web_folder_protection($web['document_root'], false);
if($backup['backup_mode'] == 'userzip') {
if(file_exists($backup_dir.'/'.$backup['filename']) && $web['document_root'] != '' && $web['document_root'] != '/' && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) {
if(file_exists($web['document_root'].'/backup/'.$backup['filename'])) rename($web['document_root'].'/backup/'.$backup['filename'], $web['document_root'].'/backup/'.$backup['filename'].'.bak');
......@@ -148,6 +149,7 @@ class backup_plugin {
$app->log('Restored Web backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);
}
}
$app->system->web_folder_protection($web['document_root'], true);
}
} else {
$app->log('Backup directory not ready.', LOGLEVEL_DEBUG);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment