aboutsummaryrefslogtreecommitdiffstats
path: root/packages/autoconfigbackup/autoconfigbackup.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-12-06 21:40:21 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-12-06 21:40:21 +0000
commit520815c32403c3517dc0494a84e3fd8df4a01125 (patch)
tree0bb3a0b6d20499457f9eb9be0d8c0ed48a020593 /packages/autoconfigbackup/autoconfigbackup.php
parent6e8d41a5de7a7909afb186afe1f41856ce66245c (diff)
downloadpfsense-packages-520815c32403c3517dc0494a84e3fd8df4a01125.tar.gz
pfsense-packages-520815c32403c3517dc0494a84e3fd8df4a01125.tar.bz2
pfsense-packages-520815c32403c3517dc0494a84e3fd8df4a01125.zip
Use !=
Diffstat (limited to 'packages/autoconfigbackup/autoconfigbackup.php')
-rw-r--r--packages/autoconfigbackup/autoconfigbackup.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php
index bc45749b..1a503c8b 100644
--- a/packages/autoconfigbackup/autoconfigbackup.php
+++ b/packages/autoconfigbackup/autoconfigbackup.php
@@ -103,8 +103,8 @@ if($_REQUEST['newver'] != "") {
curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_session, CURLOPT_POSTFIELDS, "action=restore" .
- "&hostname=" . urlencode($hostname) .
- "&revision=" . urlencode($_REQUEST['newver']));
+ "&hostname=" . urlencode($hostname) .
+ "&revision=" . urlencode($_REQUEST['newver']));
$data = curl_exec($curl_session);
if (!tagfile_deformat($data, $data, "config.xml"))
$input_errors[] = "The downloaded file does not appear to contain an encrypted pfSense configuration.";
@@ -115,9 +115,9 @@ if($_REQUEST['newver'] != "") {
fwrite($fd, $data);
fclose($fd);
$ondisksha256 = trim(`/sbin/sha256 /tmp/config_restore.xml | awk '{ print $4 }'`);
- if($sha256 <> "0" || $sha256 <> "") // we might not have a sha256 on file for older backups
+ if($sha256 != "0" || $sha256 != "") // we might not have a sha256 on file for older backups
if($ondisksha256 <> $sha256)
- $input_errors[] = "SHA256 does not match, cannot restore. $sha256 $ondisksha256";
+ $input_errors[] = "SHA256 does not match, cannot restore. ({$sha256}) - ({$ondisksha256})";
if (curl_errno($curl_session)) {
/* If an error occured, log the error in /tmp/ */
$fd = fopen("/tmp/backupdebug.txt", "w");