mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Respect xml_rootobj when restoring a full backup
This commit is contained in:
parent
619fe0c483
commit
2a48bc009d
@ -263,8 +263,8 @@ if ($_POST) {
|
||||
$savemsg = "The configuration area has been restored. You may need to reboot the firewall.";
|
||||
}
|
||||
} else {
|
||||
if(!stristr($data, "<pfsense>")) {
|
||||
$input_errors[] = "You have selected to restore the full configuration but we could not locate a pfsense tag.";
|
||||
if(!stristr($data, $g['xml_rootobj'])) {
|
||||
$input_errors[] = "You have selected to restore the full configuration but we could not locate a " . $g['xml_rootobj'] . " tag.";
|
||||
} else {
|
||||
/* restore the entire configuration */
|
||||
file_put_contents($_FILES['conffile']['tmp_name'], $data);
|
||||
@ -548,4 +548,4 @@ if($reboot_needed == true) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user