From 343266ccf71605dbde9aff845f3075f3c090a829 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Sun, 24 Feb 2013 10:50:48 -0300 Subject: Encrypt backup after rrd data is added, it fixes #2836 --- usr/local/www/diag_backup.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'usr') 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 .= "\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}"); -- cgit v1.1