summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorpierrepomes <pierre.pomes@interface-tech.com>2010-10-17 22:44:37 -0400
committerpierrepomes <pierre.pomes@interface-tech.com>2010-10-17 22:44:37 -0400
commit00686feea96c36ec2406339bc622e89f85ce901f (patch)
treea35533d0b0ecbde472fff16c8a2c1fb4d1f6c449 /usr
parent71880c969c81bf502e1047812691aff1ead399b4 (diff)
downloadpfsense-00686feea96c36ec2406339bc622e89f85ce901f.zip
pfsense-00686feea96c36ec2406339bc622e89f85ce901f.tar.gz
Character '#' is invalid in string fields of SNMP service screen. Ticket #956
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/services_snmp.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/services_snmp.php b/usr/local/www/services_snmp.php
index d3cda15..8b79c66 100755
--- a/usr/local/www/services_snmp.php
+++ b/usr/local/www/services_snmp.php
@@ -84,6 +84,10 @@ if ($_POST) {
/* input validation */
if ($_POST['enable']) {
+ if (strstr($_POST['syslocation'],"#")) $input_errors[] = gettext("Invalid character '#' in system location");
+ if (strstr($_POST['syscontact'],"#")) $input_errors[] = gettext("Invalid character '#' in system contact");
+ if (strstr($_POST['rocommunity'],"#")) $input_errors[] = gettext("Invalid character '#' in read community string");
+
$reqdfields = explode(" ", "rocommunity");
$reqdfieldsn = array(gettext("Community"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
@@ -96,6 +100,8 @@ if ($_POST) {
}
if ($_POST['trapenable']) {
+ if (strstr($_POST['trapstring'],"#")) $input_errors[] = gettext("Invalid character '#' in SNMP trap string");
+
$reqdfields = explode(" ", "trapserver");
$reqdfieldsn = array(gettext("Trap server"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
OpenPOWER on IntegriCloud