summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizards
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-06-25 12:17:09 -0400
committerjim-p <jimp@pfsense.org>2010-06-25 12:17:09 -0400
commitff93a5c1460e5c48f10fe92587ff2913eff8450a (patch)
tree578c0d37b99da9c4140302790ccfe834366c4d6e /usr/local/www/wizards
parent85ee0940ac9774cffe066e15249fde1edaa8f812 (diff)
downloadpfsense-ff93a5c1460e5c48f10fe92587ff2913eff8450a.zip
pfsense-ff93a5c1460e5c48f10fe92587ff2913eff8450a.tar.gz
Validate time server. Should be the last thing that fixes #464
Diffstat (limited to 'usr/local/www/wizards')
-rw-r--r--usr/local/www/wizards/setup_wizard.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index b6300fd..d0ef4b3 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -130,6 +130,8 @@
<description>Enter the hostname (FQDN) of the time server.</description>
<type>input</type>
<bindstofield>system->timeservers</bindstofield>
+ <validate>^[a-z0-9.|-]+$</validate>
+ <message>Invalid Time Server Field</message>
</field>
<field>
<name>Timezone</name>
@@ -141,6 +143,14 @@
<type>submit</type>
</field>
</fields>
+ <stepsubmitphpaction>
+ <![CDATA[
+ if(!empty($_POST['timeserverhostname']) && !(is_hostname($_POST['timeserverhostname']) || is_ipaddr($_POST['timeserverhostname']))) {
+ print_info_box_np("Invalid Time Server. Please press back in your browser window and correct.");
+ die;
+ }
+ ]]>
+ </stepsubmitphpaction>
</step>
<step>
<id>4</id>
OpenPOWER on IntegriCloud