summaryrefslogtreecommitdiffstats
path: root/src/usr/local
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-06-01 19:43:44 -0500
committerChris Buechler <cmb@pfsense.org>2016-06-01 19:43:44 -0500
commit582a45f9baed6e8af0e3e9d0949a51238d8cd137 (patch)
treea8263c25ed714aefaf0da523f8c73b48c2eeed1e /src/usr/local
parente488da267defbdb80572141b92ce2dd33375d249 (diff)
downloadpfsense-582a45f9baed6e8af0e3e9d0949a51238d8cd137.zip
pfsense-582a45f9baed6e8af0e3e9d0949a51238d8cd137.tar.gz
Allow - and _ in sysctl values. Ticket #6438
Diffstat (limited to 'src/usr/local')
-rw-r--r--src/usr/local/www/system_advanced_sysctl.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/system_advanced_sysctl.php b/src/usr/local/www/system_advanced_sysctl.php
index 109326e..6467f25 100644
--- a/src/usr/local/www/system_advanced_sysctl.php
+++ b/src/usr/local/www/system_advanced_sysctl.php
@@ -142,8 +142,8 @@ if ($_POST) {
if (!$_POST['tunable'] || !isset($_POST['value'])) {
$input_errors[] = gettext("Both a name and a value must be specified.");
- } else if (!ctype_alnum($_POST['value'])) {
- $input_errors[] = gettext("The value may contain alphanumeric characters only.");
+ } else if (preg_match("/[^a-zA-Z0-9.\-_]/", $_POST['value'])) {
+ $input_errors[] = gettext("The value may only contain alphanumeric characters, - and _.");
} else {
$tunableent['tunable'] = htmlspecialchars($_POST['tunable']);
$tunableent['value'] = htmlspecialchars($_POST['value']);
OpenPOWER on IntegriCloud