summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-02-11 01:44:14 -0600
committerChris Buechler <cmb@pfsense.org>2016-02-11 01:44:14 -0600
commitd1981cc67f5c2c76f1812bb3009d944a597bb2db (patch)
tree51fb8d1fced0abc51afd3faea7d5cee88fefecc5 /src
parent091cd1760510e0de4f669ba5c54a1ab3dd69e2cb (diff)
downloadpfsense-d1981cc67f5c2c76f1812bb3009d944a597bb2db.zip
pfsense-d1981cc67f5c2c76f1812bb3009d944a597bb2db.tar.gz
use is_numericint rather than is_numeric for input validation here
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/vpn_ipsec_phase2.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr/local/www/vpn_ipsec_phase2.php b/src/usr/local/www/vpn_ipsec_phase2.php
index 0f65b75..e214e11 100644
--- a/src/usr/local/www/vpn_ipsec_phase2.php
+++ b/src/usr/local/www/vpn_ipsec_phase2.php
@@ -180,7 +180,7 @@ if ($_POST) {
if (($pconfig['mode'] == "tunnel") || ($pconfig['mode'] == "tunnel6")) {
switch ($pconfig['localid_type']) {
case "network":
- if (($pconfig['localid_netbits'] != 0 && !$pconfig['localid_netbits']) || !is_numeric($pconfig['localid_netbits'])) {
+ if (($pconfig['localid_netbits'] != 0 && !$pconfig['localid_netbits']) || !is_numericint($pconfig['localid_netbits'])) {
$input_errors[] = gettext("A valid local network bit count must be specified.");
}
case "address":
@@ -207,7 +207,7 @@ if ($_POST) {
if (!empty($pconfig['natlocalid_address'])) {
switch ($pconfig['natlocalid_type']) {
case "network":
- if (($pconfig['natlocalid_netbits'] != 0 && !$pconfig['natlocalid_netbits']) || !is_numeric($pconfig['natlocalid_netbits'])) {
+ if (($pconfig['natlocalid_netbits'] != 0 && !$pconfig['natlocalid_netbits']) || !is_numericint($pconfig['natlocalid_netbits'])) {
$input_errors[] = gettext("A valid NAT local network bit count must be specified.");
}
if ($pconfig['localid_type'] == "address") {
@@ -237,7 +237,7 @@ if ($_POST) {
switch ($pconfig['remoteid_type']) {
case "network":
- if (($pconfig['remoteid_netbits'] != 0 && !$pconfig['remoteid_netbits']) || !is_numeric($pconfig['remoteid_netbits'])) {
+ if (($pconfig['remoteid_netbits'] != 0 && !$pconfig['remoteid_netbits']) || !is_numericint($pconfig['remoteid_netbits'])) {
$input_errors[] = gettext("A valid remote network bit count must be specified.");
}
case "address":
@@ -382,7 +382,7 @@ if ($_POST) {
}
}
}
- if (($_POST['lifetime'] && !is_numeric($_POST['lifetime']))) {
+ if (($_POST['lifetime'] && !is_numericint($_POST['lifetime']))) {
$input_errors[] = gettext("The P2 lifetime must be an integer.");
}
OpenPOWER on IntegriCloud