CGI::Untaint::hostname - untaint DNS host names


CGI-Untaint-hostname documentation  | view source Contained in the CGI-Untaint-hostname distribution.

Index


NAME

Top

CGI::Untaint::hostname - untaint DNS host names

SYNOPSIS

Top

  use CGI::Untaint::hostname
  my $handler = CGI::Untaint->new( $q->Vars() );
  my $filename = $handler->extract( -as_hostname => 'some-host.some-domain.com' );




DESCRIPTION

Top

This module untaints and validates DNS host names. Validation means that the name has the correct syntax specified in RFC 1035 section 3.5 (page 10), not that it exists (after all you could use this in a web front-end to a dns zone maintenance system) anywhere in any form.

INSTALLATION

Top

to install the module...

perl Build.PL ./Build ./Build test ./Build install

BUGS

Top

None known.

SUPPORT

Top

E-mail the author

AUTHOR

Top

	Dana Hudes
	CPAN ID: DHUDES
	dhudes@hudes.org
	http://www.hudes.org

COPYRIGHT

Top

SEE ALSO

Top

perl(1), CGI::Untaint, RFC 1035.

is_valid

 Usage     : $self->is_valid
 Purpose   : Ensure that the hostname name is completely valid including length checking
 Returns   : true if the name is valid
 Argument  : the string to validate is in $self object
 Throws    : nothing
 Comments  :

See Also : is_ok

is_ok

 Usage     : $self->is_ok($value)
 Purpose   : Perform syntax and length checking to validate the name
 Returns   : true if the name is valid
 Argument  : the string to validate
 Throws    : nothing of its own
 Comments  : RFC 1304 section 3.5 specificies the syntax and length limits on the names. Each section, separated by '.',
           : must start with a letter, end with a letter or digit, and have as interior
           : characters only letters, digits, and hyphen. The length of each section is  63 characters maximum.
           : While it is customary to have a two or three letter "top-level domain" suffix, this is not
           : required (cf ".arpa") 
           : N.B. while empirically it seems that registrars are registering names starting with digits, (e.g., 123.com) I find no 
           : basis for this in any RFC.
See Also   : is_ok


CGI-Untaint-hostname documentation  | view source Contained in the CGI-Untaint-hostname distribution.