Hello All:
FOR reg_system.cgi
Here's a quick fix for doing a check on the username for spaces and other
characters, and only allowing alphanumeric characters up to 12 for
reg_username. The character limit can be achieved simply by adding the
maxlength=12 attribute to the text input field for New Username, in
new_order.html. Add it at the top of the sub verify_order sub-routine.
Otherwise you'll get errors at the end with no warning. I just went live,
and forgot about hearing about this problem on the lists earlier, and had
problems with the registration at the last step - registering the domain.
============================
#Added by eric
$error_trap = 0;
if ($in{reg_username}) {
$lenuser = length($in{reg_username}); #get the length for the pattern
match
#check to make sure there are no spaces in the username too
if ($in{reg_username} !~ /(([a-zA-Z0-9]){$lenuser,12})/) {
$error_msg = "Illegal characters in User Name. Valid characters are
a-z,A-Z,0-9, to a maximum of 12 characters.\n";
error_out($error_msg);
exit;
}
}
===============================
Eric
Hostmaster [Beck Web Servers & Design]
mailto:hostmaster@bwsd.com
================================
This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:35:22 EDT