ozbcoz> I notice that in the test (Horizon) system you can register a
ozbcoz> domain with no nameserver information (just by leaving it blank) if
ozbcoz> you use register.cgi. is this also true in the production system -
ozbcoz> if so then I need to build in some additional checks into
ozbcoz> register.cgi.
Here is what I changed. If anyone has a method of actually checking if the
given nameservers are registered with Internic, that would be most helpful
(perhaps OpenSRS can provide a method).
Index: reg_system.cgi
===================================================================
RCS file: /usr/local/src/cvsroot/horsey.gshapiro.net/usr/local/www/cgi-bin/www.retsiger.com/reg_system.cgi,v
retrieving revision 1.8
retrieving revision 1.10
diff -u -r1.8 -r1.10
--- reg_system.cgi 2000/04/14 16:39:41 1.8
+++ reg_system.cgi 2000/04/20 23:59:44 1.10
@@ -265,7 +265,8 @@
}
# encode the nameserver info and pass it to the next form
- if ($REG_SYSTEM{custom_nameservers}) {
+ if ($REG_SYSTEM{custom_nameservers} &&
+ $in{reg_type} eq "new") {
foreach $num (1..6) {
$fqdn = $in{"fqdn$num"};
if ($fqdn) {
@@ -1138,19 +1139,23 @@
<TD><input name="fqdn2" size=39 value="$nameservers{fqdn2}"></TD>
</TR>
<TR>
- <TD ALIGN=right bgcolor="#90c0ff"><B>Third DNS Hostname:</B></TD>
+ <TD ALIGN=right bgcolor="#90c0ff"><font color=red size=-1>
+ *optional*</font> <B>Third DNS Hostname:</B></TD>
<TD><input name="fqdn3" size=39 value="$nameservers{fqdn3}"></TD>
</TR>
<TR>
- <TD ALIGN=right bgcolor="#90c0ff"><B>Fourth DNS Hostname:</B></TD>
+ <TD ALIGN=right bgcolor="#90c0ff"><font color=red size=-1>
+ *optional*</font> <B>Fourth DNS Hostname:</B></TD>
<TD><input name="fqdn4" size=39 value="$nameservers{fqdn4}"></TD>
</TR>
<TR>
- <TD ALIGN=right bgcolor="#90c0ff"><B>Fifth DNS Hostname:</B></TD>
+ <TD ALIGN=right bgcolor="#90c0ff"><font color=red size=-1>
+ *optional*</font> <B>Fifth DNS Hostname:</B></TD>
<TD><input name="fqdn5" size=39 value="$nameservers{fqdn5}"></TD>
</TR>
<TR>
- <TD ALIGN=right bgcolor="#90c0ff"><B>Sixth DNS Hostname:</B></TD>
+ <TD ALIGN=right bgcolor="#90c0ff"><font color=red size=-1>
+ *optional*</font> <B>Sixth DNS Hostname:</B></TD>
<TD><input name="fqdn6" size=39 value="$nameservers{fqdn6}"></TD>
</TR>
EOF
Index: OpenSRS.pm
===================================================================
RCS file: /usr/local/src/cvsroot/horsey.gshapiro.net/usr/local/www/cgi-bin/www.retsiger.com/lib/OpenSRS.pm,v
retrieving revision 1.1
retrieving revision 1.3
diff -u -r1.1 -r1.3
--- OpenSRS.pm 2000/04/14 16:39:41 1.1
+++ OpenSRS.pm 2000/04/20 23:59:44 1.3
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $Id: OpenSRS.pm,v 1.1 2000/04/14 16:39:41 gshapiro Exp $
+# $Id: OpenSRS.pm,v 1.3 2000/04/20 23:59:44 gshapiro Exp $
# .Copyright (C) 1999-2000 TUCOWS.com Inc.
# .Created: 11/19/1999
@@ -302,8 +302,17 @@
$contact_types{tech} = "Tech";
}
- #XXX validate the nameservers
+ if ($params{custom_nameservers} &&
+ $data->{reg_type} eq "new") {
+ #XXX validate the nameservers
+ if (!$data->{fqdn1}) {
+ push @missing_fields, "Primary DNS Hostname";
+ }
+ if (!$data->{fqdn2}) {
+ push @missing_fields, "Secondary DNS Hostname";
+ }
+ }
####################################
# check the required fields
This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:35:27 EDT