diff options
Diffstat (limited to 'packages/autoconfigbackup/autoconfigbackup.php')
-rw-r--r-- | packages/autoconfigbackup/autoconfigbackup.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php index 2a02bd82..cc3740ca 100644 --- a/packages/autoconfigbackup/autoconfigbackup.php +++ b/packages/autoconfigbackup/autoconfigbackup.php @@ -114,6 +114,8 @@ if($_REQUEST['newver'] != "") { $fd = fopen("/tmp/config_restore.xml", "w"); fwrite($fd, $data); fclose($fd); + if(count($data) < 50) + $input_errors[] = "The decrypted config.xml is under 50 characters, something went wrong. Aborting."; $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($ondisksha256 <> $sha256) |