summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-06-17 07:33:46 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-06-17 07:34:03 -0300
commit54a9da9fceff7e5d2524bd30d31c2756dd46f357 (patch)
treec138e38c7f4b8ede6eebb53fdf52d43d272ddad1 /usr/local/www
parente7eeb5ceac07f83630ced5e9cf18b10083a9aca8 (diff)
downloadpfsense-54a9da9fceff7e5d2524bd30d31c2756dd46f357.zip
pfsense-54a9da9fceff7e5d2524bd30d31c2756dd46f357.tar.gz
Validate starttime and stoptime format
Diffstat (limited to 'usr/local/www')
-rw-r--r--usr/local/www/firewall_schedule_edit.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index 98f9ce1..a197942 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -116,6 +116,14 @@ if ($_POST) {
$timerangeFound = false;
for ($x=0; $x<99; $x++){
if($_POST['schedule' . $x]) {
+ if (!preg_match('/^[0-9]+:[0-9]+$/', $_POST['starttime' . $x])) {
+ $input_errors[] = sprintf(gettext("Invalid start time - '%s'"), $_POST['starttime' . $x]);
+ continue;
+ }
+ if (!preg_match('/^[0-9]+:[0-9]+$/', $_POST['stoptime' . $x])) {
+ $input_errors[] = sprintf(gettext("Invalid start time - '%s'"), $_POST['stoptime' . $x]);
+ continue;
+ }
$timerangeFound = true;
$timeparts = array();
$firstprint = false;
OpenPOWER on IntegriCloud