Skip to content

Commit d219d48

Browse files
author
Marius Cramer
committed
- fixed missing web protection removal on backup restore
1 parent 4863035 commit d219d48

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/plugins-available/backup_plugin.inc.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ public function backup_action($action_name, $data) {
128128

129129
//* Restore a web backup
130130
if($action_name == 'backup_restore' && $backup['backup_type'] == 'web') {
131+
$app->system->web_folder_protection($web['document_root'], false);
131132
if($backup['backup_mode'] == 'userzip') {
132133
if(file_exists($backup_dir.'/'.$backup['filename']) && $web['document_root'] != '' && $web['document_root'] != '/' && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) {
133134
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 @@ public function backup_action($action_name, $data) {
148149
$app->log('Restored Web backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG);
149150
}
150151
}
152+
$app->system->web_folder_protection($web['document_root'], true);
151153
}
152154
} else {
153155
$app->log('Backup directory not ready.', LOGLEVEL_DEBUG);

0 commit comments

Comments
 (0)