summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-02-24 10:50:48 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-02-24 10:52:26 -0300
commit343266ccf71605dbde9aff845f3075f3c090a829 (patch)
treeb4675fbb15b8920f63ad7b5dfd7c0aaae3e9ea1b
parent51204df1d9abb5d3cfd647c82bb8e223fc776d77 (diff)
downloadpfsense-343266ccf71605dbde9aff845f3075f3c090a829.zip
pfsense-343266ccf71605dbde9aff845f3075f3c090a829.tar.gz
Encrypt backup after rrd data is added, it fixes #2836
-rwxr-xr-xusr/local/www/diag_backup.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index 13c8d9f..743da33 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -216,11 +216,6 @@ if ($_POST) {
//unlock($lockbckp);
- if ($_POST['encrypt']) {
- $data = encrypt_data($data, $_POST['encrypt_password']);
- tagfile_reformat($data, $data, "config.xml");
- }
-
/*
* Backup RRD Data
*/
@@ -242,6 +237,11 @@ if ($_POST) {
$data .= "</" . $g['xml_rootobj'] . ">\n";
}
+ 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}");
OpenPOWER on IntegriCloud