summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-10 15:50:26 -0500
committersullrich <sullrich@pfsense.org>2009-12-10 15:50:26 -0500
commit9cadc5438c04a078430a8ad7bdaa27fc474ee56d (patch)
tree9d68b357de5485d9ce3f88091a87b084628f5e19 /etc
parent9dc9718d81f26cfcc3d0679e1582abc9b2d476c1 (diff)
downloadpfsense-9cadc5438c04a078430a8ad7bdaa27fc474ee56d.zip
pfsense-9cadc5438c04a078430a8ad7bdaa27fc474ee56d.tar.gz
Escape CARP password. Resolves #213
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index e0814d2..54f0fd2 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -359,7 +359,8 @@ function interfaces_carp_configure() {
if ($vip['mode'] == "carp") {
$vip_password = $vip['password'];
$vip_password = str_replace(" ", "", $vip_password);
-
+ $vip_password = escapeshellarg(addslashes($vip_password));
+
/* ensure CARP IP really exists prior to loading up */
$found = false;
$iflist = array("lan", "wan");
@@ -397,7 +398,7 @@ function interfaces_carp_configure() {
$broadcast_address = gen_subnet_max($vip['subnet'], $vip['subnet_bits']);
if($vip['password'] != "")
- $password = " pass \"" . $vip_password . "\"";
+ $password = " pass {$vip_password}";
if($debugging)
echo "Configuring carp{$carp_instances_counter}.\n";
fwrite($fd, "/sbin/ifconfig carp" . $carp_instances_counter . " " . $vip['subnet'] . "/" . $vip['subnet_bits'] . " vhid " . $vip['vhid'] . "{$carpdev} advskew 200 " . $password . "\n");
OpenPOWER on IntegriCloud