From d219d4828659298536c9c7ba117dd28057e8910a Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Mon, 15 Jun 2015 18:56:51 +0200 Subject: [PATCH] - fixed missing web protection removal on backup restore --- server/plugins-available/backup_plugin.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 249ca04b5b..b00b8e632c 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -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); -- GitLab