#25418: URL Validator to check only hostname part without domain nor tld
------------------------------+------------------------------------
Reporter: foxmask | Owner: nobody
Type: Bug | Status: new
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Old description:
> Hi,
> on the LAN, we don't use full scheme of host + domain + tld, so it could
> be fine if we could change this
>
> host_re = '(' + hostname_re + domain_re + tld_re + '|localhost)'
>
> to
>
> host_re = '(' + hostname_re + domain_re + tld_re + '|' + hostname_re
> + '|localhost)'
>
> regards
New description:
Hi,
on the LAN, we don't use full scheme of host + domain + tld, so it could
be fine if we could change this
{{{
host_re = '(' + hostname_re + domain_re + tld_re + '|localhost)'
}}}
to
{{{
host_re = '(' + hostname_re + domain_re + tld_re + '|' + hostname_re +
'|localhost)'
}}}
regards
--
Comment (by timgraham):
I believe the idea of `URLValidator` is to recognize URLs that usually
work without some special DNS setup. I feel like this proposal has come up
before and been rejected. If so, we should document the restriction (and
how to lift it in your own validation) to try to prevent it from being
proposed again and again.
--
Ticket URL: <https://code.djangoproject.com/ticket/25418#comment:2>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.aea9ceb447684a86e50b97999a02b0bb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.