Re: [Django] #18517: URLField does not support url with underscore

2020-02-13 Thread Django
#18517: URLField does not support url with underscore
-+--
 Reporter:  guoqiao  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  1.6
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  URLFiled | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--
Changes (by felixxm):

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


Comment:

 [https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
 tickets/#closing-tickets Follow triaging guidelines with regards to
 wontfix tickets.]

-- 
Ticket URL: 
Django 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.164999e1bdd139d22d5b27d39e19be12%40djangoproject.com.


Re: [Django] #18517: URLField does not support url with underscore

2020-02-13 Thread Django
#18517: URLField does not support url with underscore
-+--
 Reporter:  guoqiao  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  1.6
 Severity:  Normal   |   Resolution:
 Keywords:  URLFiled | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--
Changes (by Ramiro):

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


Comment:

 Underscores are very much a real thing in hostnames.  Please reconsider
 this case on the latest version of code.  Many sites (especially malicious
 ones) may employ the use of underscores.  So I am trying to use Django's
 validators to tell me about *actual* malformed URL's, not those that might
 just be typos.  It's a validator afterall and IMO it should follow the
 standard and not have it's own standard.

-- 
Ticket URL: 
Django 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0beef951e93599a9e743b9dda32e3549%40djangoproject.com.


Re: [Django] #18517: URLField does not support url with underscore

2014-05-07 Thread Django
#18517: URLField does not support url with underscore
-+--
 Reporter:  guoqiao  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  1.6
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  URLFiled | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--

Comment (by shai):

 Replying to [comment:5 slaughninja]:
 > If the Django URLValidator is aiming to meet the RFC1034/1035 then it
 should be named DomainNameValidator. The RFC for URLs would be RFC1738,
 which kinda, sorta allows for underscores to be used unquoted (it is a
 reserved character).

 RFC1738 may allow underscores in URLs generally, but not in the hostname.

 >
 > Also, the realitity is that there hosts out there that use underscores
 in their name, especially in subdomains. Even if it is not standard or
 recommended, hosts like that are still out there (and often outside the
 control of the dev) and the current behaviour renders it unusable for
 production.

 What Claude said; if you disagree, the place to argue about it is the
 DevelopersMailingList.

-- 
Ticket URL: 
Django 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.655ff16f305f8688dcd7dbc71f52feba%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #18517: URLField does not support url with underscore

2014-01-16 Thread Django
#18517: URLField does not support url with underscore
-+--
 Reporter:  guoqiao  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  1.6
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  URLFiled | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--
Changes (by slaughninja):

 * version:  1.4 => 1.6


Comment:

 If the Django URLValidator is aiming to meet the RFC1034/1035 then it
 should be named DomainNameValidator. The RFC for URLs would be RFC1738,
 which kinda, sorta allows for underscores to be used unquoted (it is a
 reserved character).

 Also, the realitity is that there hosts out there that use underscores in
 their name, especially in subdomains. Even if it is not standard or
 recommended, hosts like that are still out there (and often outside the
 control of the dev) and the current behaviour renders it unusable for
 production.

-- 
Ticket URL: 
Django 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.41398c570aff10e2a814890bb07440c3%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #18517: URLField does not support url with underscore

2012-06-26 Thread Django
#18517: URLField does not support url with underscore
-+--
 Reporter:  guoqiao  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  1.4
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  URLFiled | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--

Comment (by aaugustin):

 To be honest, the URLValidator doesn't aim for strict conformance to RFC.
 Rather, it attempts to catch typos in URLs entered manually in the admin.

 Of course, it follows the RFC whenever possible, but it's also written
 with real-life use cases in mind.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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




Re: [Django] #18517: URLField does not support url with underscore

2012-06-26 Thread Django
#18517: URLField does not support url with underscore
-+--
 Reporter:  guoqiao  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  1.4
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  URLFiled | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--
Changes (by claudep):

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


Comment:

 The Django URLValidator is aiming to check if URLs are valid according to
 official rules (RFC 1034/1035) which forbid the usage of underscores in
 hostnames (read also http://www.quora.com/Domain-Name-System-DNS/Why-are-
 underscores-not-allowed-in-DNS-host-names).

 If you want to relax rules for your particular usage, just subclass
 fields/validators and adapt them. But I don't think we should change the
 default validator for broken existing URLs.

 About the example you provided, see
 https://github.com/rtfd/readthedocs.org/issues/148

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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




Re: [Django] #18517: URLField does not support url with underscore

2012-06-26 Thread Django
#18517: URLField does not support url with underscore
-+--
 Reporter:  guoqiao  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:  URLFiled | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--

Old description:

> if your url has a '_' in it, like this:
> http://django_compressor.readthedocs.org/
> the URLField will complain that it is not a valid url. the problem lies
> in the '_' symbol. I find in the source code as Following:
> class URLValidator(RegexValidator):
> regex = re.compile(
> r'^(?:http|ftp)s?://' # http:// or https://
> r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'
> #domain...
> r'localhost|' #localhost...
> r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip
> r'(?::\d+)?' # optional port
> r'(?:/?|[/?]\S+)$', re.IGNORECASE)
> the related part is this line:
> r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'
> It's clear that '_' is not included in the pattern.
> I think this is not reaonable for there's a lot of url has a '_' in it.

New description:

 if your url has a '_' in it, like this:
  * http://django_compressor.readthedocs.org/
 the URLField will complain that it is not a valid url. the problem lies in
 the '_' symbol. I find in the source code as Following:
 {{{
 class URLValidator(RegexValidator):
 regex = re.compile(
 r'^(?:http|ftp)s?://' # http:// or https://
 
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'
 #domain...
 r'localhost|' #localhost...
 r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip
 r'(?::\d+)?' # optional port
 r'(?:/?|[/?]\S+)$', re.IGNORECASE)
 }}}

 the related part is this line:
 {{{
 
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'
 }}}

 It's clear that '_' is not included in the pattern.
 I think this is not reaonable for there's a lot of url has a '_' in it.

--

Comment (by claudep):

 Reformatted, please use preview before posting the ticket.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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




Re: [Django] #18517: URLField does not support url with underscore

2012-06-26 Thread Django
#18517: URLField does not support url with underscore
-+--
 Reporter:  guoqiao  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:  URLFiled | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  1|UI/UX:  0
-+--
Changes (by guoqiao):

 * cc: guoqiao (added)
 * needs_better_patch:   => 0
 * component:  Uncategorized => Core (URLs)
 * needs_tests:   => 0
 * easy:  0 => 1
 * keywords:   => URLFiled
 * needs_docs:   => 0
 * type:  Uncategorized => Bug


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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




[Django] #18517: URLField does not support url with underscore

2012-06-26 Thread Django
#18517: URLField does not support url with underscore
---+
 Reporter:  guoqiao|  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Uncategorized  |Version:  1.4
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 if your url has a '_' in it, like this:
 http://django_compressor.readthedocs.org/
 the URLField will complain that it is not a valid url. the problem lies in
 the '_' symbol. I find in the source code as Following:
 class URLValidator(RegexValidator):
 regex = re.compile(
 r'^(?:http|ftp)s?://' # http:// or https://
 
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'
 #domain...
 r'localhost|' #localhost...
 r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' # ...or ip
 r'(?::\d+)?' # optional port
 r'(?:/?|[/?]\S+)$', re.IGNORECASE)
 the related part is this line:
 
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|'
 It's clear that '_' is not included in the pattern.
 I think this is not reaonable for there's a lot of url has a '_' in it.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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