summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authorhamnur <hamnur@protonmail.com>2017-07-14 12:29:41 +0200
committerhamnur <hamnur@protonmail.com>2017-07-14 12:29:41 +0200
commitaf729f53f3c838f91dffb6368b656ddece527e05 (patch)
tree1680f13d0c17edc5943831e400b0d0d58c291dd2 /src/usr/local/www
parente18ddb38449b6463fabf5782284b206a355dbad7 (diff)
downloadpfsense-af729f53f3c838f91dffb6368b656ddece527e05.zip
pfsense-af729f53f3c838f91dffb6368b656ddece527e05.tar.gz
Check if margintime is numeric and smaller than P1 lifetime
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/vpn_ipsec_phase1.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/usr/local/www/vpn_ipsec_phase1.php b/src/usr/local/www/vpn_ipsec_phase1.php
index 300ebce..72e9a5c 100644
--- a/src/usr/local/www/vpn_ipsec_phase1.php
+++ b/src/usr/local/www/vpn_ipsec_phase1.php
@@ -240,8 +240,12 @@ if ($_POST['save']) {
$input_errors[] = gettext("The P1 lifetime must be an integer.");
}
- if (($pconfig['margintime'] && !is_numericint($pconfig['margintime']))) {
- $input_errors[] = gettext("The margintime must be an integer.");
+ if ($pconfig['rekey_enable']) {
+ if(!is_numericint($pconfig['margintime'])){
+ $input_errors[] = gettext("The margintime must be an integer.");
+ } else if(intval($pconfig['margintime']) >= intval($pconfig['lifetime'])){
+ $input_errors[] = gettext("The margintime must be smaller than the P1 lifetime.");
+ }
}
if ($pconfig['remotegw']) {
OpenPOWER on IntegriCloud