#20264: URLValidator should allow underscores in local hostname
------------------------------+--------------------------------------
     Reporter:  arthurdebert  |                    Owner:  nobody
         Type:  Bug           |                   Status:  closed
    Component:  Core (Other)  |                  Version:  master
     Severity:  Normal        |               Resolution:  invalid
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  1             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  1             |                    UI/UX:  0
------------------------------+--------------------------------------
Changes (by apollo13):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 An underscore is not valid as per RFC-952 (we are talking '''hostname'''
 in URLs and not '''DNS records''', I am aware that DNS records like srv
 require/allow underscores). RFC-1123 section 2.1 later on relaxed that but
 still didn't allow an underscore. RFC-2821 increased the length, but
 again, no adding of underscore.

 To answer:
 > I've ran into this from such URLs we are seening in the wild. A great
 number of tools ( popular browsers, curl, wget , BIND) will allow for such
 addresses (underscore in the local part).

 Browsers do whatever they think is best, from their point of view it
 obviously makes no sense to disallow underscores. BIND obviously has no
 reason to disallow it either since it's valid for DNS records (yes, most
 likely even for A-records, which still doesn't make them valid with regard
 to the HTTP rfc + related ones)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20264#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to