#25620: URLValidator regex does not trigger on consecutive periods ------------------------------+-------------------- Reporter: sully90h | Owner: nobody Type: Bug | Status: new Component: Core (Other) | Version: 1.8 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ------------------------------+-------------------- The regular expression for [https://docs.djangoproject.com/en/1.8/ref/validators/#urlvalidator URLValidator] accepts consecutive periods as valid. This bug was introduced in 1.8.3.
== Steps to Reproduce == {{{ #!python >>> from django.core.validators import URLValidator >>> validate = URLValidator() >>> validate('http://example..com') >>> validate('http://example...............com') }}} == Expected Result == A [https://docs.djangoproject.com/en/1.8/ref/exceptions/#validationerror ValidationError] exception should be raised. == Current Result == No exception is raised, and the URL is deemed valid. == Reference == [https://tools.ietf.org/html/rfc2181#section-11 RFC 2181]: The length of any one label is limited to between 1 and 63 octets. A full domain name is limited to 255 octets (including the separators). The zero length full name is defined as representing the root of the DNS tree, and is typically written and displayed as ".". -- Ticket URL: <https://code.djangoproject.com/ticket/25620> 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. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.8d332f7ed2d2ba893767dac35b0f3e54%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.