mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Encrypt backup after rrd data is added, it fixes #2836
This commit is contained in:
parent
73ed069b8a
commit
4cfd23901d
@ -306,11 +306,6 @@ if ($_POST) {
|
||||
|
||||
//unlock($lockbckp);
|
||||
|
||||
if ($_POST['encrypt']) {
|
||||
$data = encrypt_data($data, $_POST['encrypt_password']);
|
||||
tagfile_reformat($data, $data, "config.xml");
|
||||
}
|
||||
|
||||
/*
|
||||
* Backup RRD Data
|
||||
*/
|
||||
@ -320,6 +315,11 @@ if ($_POST) {
|
||||
$data = str_replace($closing_tag, $rrd_data_xml . $closing_tag, $data);
|
||||
}
|
||||
|
||||
if ($_POST['encrypt']) {
|
||||
$data = encrypt_data($data, $_POST['encrypt_password']);
|
||||
tagfile_reformat($data, $data, "config.xml");
|
||||
}
|
||||
|
||||
$size = strlen($data);
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Disposition: attachment; filename={$name}");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user