id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 32298 django.core.validators.URLValidator tests netloc instead of hostname for length zt_initech Akshat Dixit "This code: https://github.com/django/django/blob/master/django/core/validators.py#L141 urlparse: https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse In case of url like {{{ urlparse('https://username1:password1@example.com/foo') }}} the parse result is: {{{ ParseResult(scheme='https', netloc='username1:password1@example.com', path='/foo', params='', query='', fragment='') }}} with the username and password in netloc. Of course if the netloc is too long only because of the password, this causes a valid URL to be not accepted. The test for length is a requirement for the hostname, so it should test .hostname instead of .netloc" Cleanup/optimization closed Core (Other) dev Normal fixed Ready for checkin 1 0 0 0 1 0