From 9882cbef8e990c82498152d6831b91b27cfd0240 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 4 Nov 2010 13:18:29 -0400 Subject: Use addslashes() here to prevent unescaped quotes from causing PHP errors. Fixes advanced/custom options in OpenVPN wizard. --- usr/local/www/wizard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/www/wizard.php') diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index 9dc4d80..965a2aa 100755 --- a/usr/local/www/wizard.php +++ b/usr/local/www/wizard.php @@ -155,7 +155,7 @@ function update_config_field($field, $updatetext, $unset, $arraynum, $field_type $text = "unset(\$config" . $field_conv . ");"; eval($text); } - $text = "\$config" . $field_conv . " = \"" . $updatetext . "\";"; + $text = "\$config" . $field_conv . " = \"" . addslashes($updatetext) . "\";"; eval($text); } -- cgit v1.1