diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-12-06 20:47:57 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-12-06 20:47:57 +0000 |
commit | e66cfcf39b960e5dfabb2b4688518fa68391857f (patch) | |
tree | 601c200e4c794fcfbbe2306cc1764fec1a88ee84 /packages/autoconfigbackup/autoconfigbackup.inc | |
parent | 93ffc598a13083537270b701c6d1b94e8434ce4d (diff) | |
download | pfsense-packages-e66cfcf39b960e5dfabb2b4688518fa68391857f.tar.gz pfsense-packages-e66cfcf39b960e5dfabb2b4688518fa68391857f.tar.bz2 pfsense-packages-e66cfcf39b960e5dfabb2b4688518fa68391857f.zip |
Add sha256 support
Diffstat (limited to 'packages/autoconfigbackup/autoconfigbackup.inc')
-rw-r--r-- | packages/autoconfigbackup/autoconfigbackup.inc | 12 |
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) |