summaryrefslogtreecommitdiffstats
path: root/etc/inc/vpn.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-05-17 14:04:08 -0400
committerjim-p <jimp@pfsense.org>2011-05-17 14:04:08 -0400
commita7af5ddccec097ced8c1cb2348415a6e5a2f5c5a (patch)
tree517799418ef7576351fd29f05e3fb7d8b8a992f4 /etc/inc/vpn.inc
parentaab2a3f6dfa3a5c13e2eee4d7f8cc6185a982ea6 (diff)
downloadpfsense-a7af5ddccec097ced8c1cb2348415a6e5a2f5c5a.zip
pfsense-a7af5ddccec097ced8c1cb2348415a6e5a2f5c5a.tar.gz
Don't put an empty PSK into the file, and try to avoid extra whitespace to be safe.
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r--etc/inc/vpn.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index b414d4a..f595c9b 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -265,7 +265,8 @@ function vpn_ipsec_configure($ipchg = false)
break;
}
- $pskconf .= "{$peerid_data}\t{$ph1ent['pre-shared-key']}\n";
+ if (!empty($peerid_data) && !empty($ph1ent['pre-shared-key']))
+ $pskconf .= trim($peerid_data) . "\t" . trim($ph1ent['pre-shared-key']) . "\n";
}
}
OpenPOWER on IntegriCloud