aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-12-07 05:05:22 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-12-07 05:05:22 +0000
commit047065a1d2c151cc5eb374dca362be7b6360b493 (patch)
treeaa35addb5369ccb6f8ea5c223725f686d66a5e12 /packages
parent7ff9bd2cd9543212c58ec148355b5cf7c849f644 (diff)
downloadpfsense-packages-047065a1d2c151cc5eb374dca362be7b6360b493.tar.gz
pfsense-packages-047065a1d2c151cc5eb374dca362be7b6360b493.tar.bz2
pfsense-packages-047065a1d2c151cc5eb374dca362be7b6360b493.zip
Add decrypted config.xml box to information page
Diffstat (limited to 'packages')
-rw-r--r--packages/autoconfigbackup/autoconfigbackup.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php
index 47864c7b..3534d0c8 100644
--- a/packages/autoconfigbackup/autoconfigbackup.php
+++ b/packages/autoconfigbackup/autoconfigbackup.php
@@ -249,14 +249,24 @@ include("head.inc");
print_input_errors($input_errors);
} else {
$ds = split("\+\+\+\+", $data);
+ $revision = $_REQUEST['download'];
+ $sha256sum = $ds[0];
+ $data = $ds[1];
+ $configtype = "Encrypted";
+ if (!tagfile_deformat($data, $data, "config.xml"))
+ $input_errors[] = "The downloaded file does not appear to contain an encrypted pfSense configuration.";
+ $data = decrypt_data($data, $decrypt_password);
+
echo "<h2>Hostname</h2>";
echo "<textarea rows='1' cols='70'>{$hostname}</textarea>";
echo "<h2>Revision date/time</h2>";
- echo "<textarea rows='1' cols='70'>{$_REQUEST['download']}</textarea>";
+ echo "<textarea name='download' rows='1' cols='70'>{$_REQUEST['download']}</textarea>";
echo "<h2>SHA256 summary</h2>";
- echo "<textarea rows='1' cols='70'>{$ds[0]}</textarea>";
+ echo "<textarea name='shasum' rows='1' cols='70'>{$sha256sum}</textarea>";
echo "<h2>Encrypted config.xml</h2>";
- echo "<textarea rows='40' cols='70'>{$ds[1]}</textarea>";
+ echo "<textarea name='config_xml' rows='40' cols='70'>{$ds[1]}</textarea>";
+ echo "<h2>Decrypted config.xml</h2>";
+ echo "<textarea name='dec_config_xml' rows='40' cols='70'>{$data}</textarea>";
}
echo "</td></tr></table></div></td></td></tr></tr></table></form>";
require("fend.inc");