From: Mark W. <ri...@us...> - 2002-08-23 07:16:31
|
Update of /cvsroot/ipcop/ipcop/html/cgi-bin In directory usw-pr-cvs1:/tmp/cvs-serv24723/html/cgi-bin Modified Files: Tag: IPCOP_v0_1 time.cgi Log Message: - Added validfqdn() function to /var/ipcop/header.pl (by me) - Added check to time.cgi to either accept valid hostname or valid IP address (by Eric Oberlander) Index: time.cgi =================================================================== RCS file: /cvsroot/ipcop/ipcop/html/cgi-bin/Attic/time.cgi,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** time.cgi 1 Jul 2002 19:00:26 -0000 1.1.2.2 --- time.cgi 23 Aug 2002 07:16:29 -0000 1.1.2.3 *************** *** 9,13 **** # (c) Eric Oberlander June 2002 # ! # /home/httpd/cgi-bin/time.cgi for IPCop 0.1.2pre1 require 'CONFIG_ROOT/header.pl'; --- 9,13 ---- # (c) Eric Oberlander June 2002 # ! # /home/httpd/cgi-bin/time.cgi for IPCop 0.1.2 require 'CONFIG_ROOT/header.pl'; *************** *** 32,38 **** if ($timesettings{'ACTION'} eq $tr{'save'}) { ! if ($timesettings{'NTP_ADDR_1'}) ! { ! if (!(&validip($timesettings{'NTP_ADDR_1'}))) { $errormessage = $tr{'invalid primary ntp'}; --- 32,39 ---- if ($timesettings{'ACTION'} eq $tr{'save'}) { ! if ($timesettings{'NTP_ADDR_1'}) ! { ! if ( ! ( &validfqdn($timesettings{'NTP_ADDR_1'}) || ! &validip ($timesettings{'NTP_ADDR_1'}))) { $errormessage = $tr{'invalid primary ntp'}; *************** *** 42,46 **** if ($timesettings{'NTP_ADDR_2'}) { ! if (!(&validip($timesettings{'NTP_ADDR_2'}))) { $errormessage = $tr{'invalid secondary ntp'}; --- 43,48 ---- if ($timesettings{'NTP_ADDR_2'}) { ! if ( ! ( &validfqdn($timesettings{'NTP_ADDR_2'}) || ! &validip ($timesettings{'NTP_ADDR_2'}))) { $errormessage = $tr{'invalid secondary ntp'}; |