diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-10-20 22:33:19 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-10-20 22:33:19 +0000 |
commit | f45e6a3b967d093bf585da381276d1bdedf8c15c (patch) | |
tree | 40ba1e9cb0e1b226714391c9380271827f8ee3e3 /etc | |
parent | 864bbcddfa996d9fab0500a1e372102c0c409ff8 (diff) | |
download | pfsense-f45e6a3b967d093bf585da381276d1bdedf8c15c.zip pfsense-f45e6a3b967d093bf585da381276d1bdedf8c15c.tar.gz |
Check for bogus decrypted config.xml
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/config.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 3c3e324..2da3546 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -224,6 +224,8 @@ function encrypted_configxml() { echo "\nEnter the password to decrypt config.xml: "; $decrypt_password = chop(fgets($fp)); $data = decrypt_data($configtxt, $decrypt_password); + if(!strstr($data, "pfsense")) + $data = ""; if($data) { $fd = fopen($g['conf_path'] . "/config.xml", "w"); fwrite($fd, $data); |