diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-02-24 10:50:48 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-02-24 10:52:26 -0300 |
commit | 343266ccf71605dbde9aff845f3075f3c090a829 (patch) | |
tree | b4675fbb15b8920f63ad7b5dfd7c0aaae3e9ea1b | |
parent | 51204df1d9abb5d3cfd647c82bb8e223fc776d77 (diff) | |
download | pfsense-343266ccf71605dbde9aff845f3075f3c090a829.zip pfsense-343266ccf71605dbde9aff845f3075f3c090a829.tar.gz |
Encrypt backup after rrd data is added, it fixes #2836
-rwxr-xr-x | usr/local/www/diag_backup.php | 10 |
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}"); |