aboutsummaryrefslogtreecommitdiffstats
path: root/packages/autoconfigbackup/autoconfigbackup.inc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/autoconfigbackup/autoconfigbackup.inc')
-rw-r--r--packages/autoconfigbackup/autoconfigbackup.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/autoconfigbackup/autoconfigbackup.inc b/packages/autoconfigbackup/autoconfigbackup.inc
index e2062ea8..818f154a 100644
--- a/packages/autoconfigbackup/autoconfigbackup.inc
+++ b/packages/autoconfigbackup/autoconfigbackup.inc
@@ -89,7 +89,7 @@ function test_connection($post) {
}
function upload_config() {
- global $config, $g;
+ global $config, $g, $input_errors;
/*
* pfSense upload config to pfSense.org script
@@ -143,15 +143,17 @@ function upload_config() {
update_filter_reload_status($notice_text);
// Encrypt config.xml
+ $raw_config_sha256_hash = trim(`/sbin/sha256 /cf/conf/config.xml | awk '{ print $4 }'`);
$data = file_get_contents("/cf/conf/config.xml");
$data = encrypt_data($data, $encryptpw);
tagfile_reformat($data, $data, "config.xml");
$post_fields = array(
- 'reason' => urlencode($reason),
- 'hostname' => urlencode($hostname),
- 'configxml' => urlencode($data)
- );
+ 'reason' => urlencode($reason),
+ 'hostname' => urlencode($hostname),
+ 'configxml' => urlencode($data),
+ 'raw_config_sha256_hash' => urlencode($raw_config_sha256_hash)
+ );
//url-ify the data for the POST
foreach($post_fields as $key=>$value)