mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Validate time server. Should be the last thing that fixes #464
This commit is contained in:
parent
85ee0940ac
commit
ff93a5c146
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user