Domain validation allows improper characters

agentrickard - November 2, 2009 - 23:01
Project:Domain Access
Version:6.x-2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

This was fixed in D5, needs applying to D6 and HEAD.

AttachmentSize
6-validate.patch1.05 KB

#1

agentrickard - November 2, 2009 - 23:01
Status:active» needs review

#2

agentrickard - November 4, 2009 - 14:38

For reference:

Hostnames are composed of series of labels concatenated with dots, as are all domain names[1]. For example, "en.wikipedia.org" is a hostname. Each label must be between 1 and 63 characters long, and the entire hostname has a maximum of 255 characters.

RFCs mandate that a hostname's labels may contain only the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Hostname labels cannot begin with a number [2] or begin or end with a hyphen. No other symbols, punctuation characters, or blank spaces are permitted.

See also http://tools.ietf.org/html/rfc1035 sec 2.3.1.

The following syntax will result in fewer problems with many

applications that use domain names (e.g., mail, TELNET).

<domain> ::= <subdomain> | " "

<subdomain> ::= <label> | <subdomain> "." <label>

<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]

<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>

<let-dig-hyp> ::= <let-dig> | "-"

<let-dig> ::= <letter> | <digit>

<letter> ::= any one of the 52 alphabetic characters A through Z in
upper case and a through z in lower case

<digit> ::= any one of the ten digits 0 through 9

Note that while upper and lower case letters are allowed in domain
names, no significance is attached to the case.  That is, two names with
the same spelling but different case are to be treated as if identical.

The labels must follow the rules for ARPANET host names.  They must
start with a letter, end with a letter or digit, and have as interior
characters only letters, digits, and hyphen.  There are also some
restrictions on the length.  Labels must be 63 characters or less.

 
 

Drupal is a registered trademark of Dries Buytaert.