Opened 7 years ago

Closed 5 years ago

#7334 closed (fixed)

URLField validator does not allow non-ASCII-Domains

Reported by: anonymous Owned by: nobody
Component: Validators Version: master
Severity: Keywords: punycode, url, validator
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Domains like http://www.müller.de/ are impossible to add in a URLField without writing direct punycode:
http://www.xn--mller-kva.de/ the validator fails.

Possible suspects:

django.core.validators:

alnumurl_re = re.compile(r'^[-\w/]+$')

isAlphaNumericURL()

Change History (3)

comment:1 Changed 7 years ago by toke

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

How should this be handled? Allow Punycode-Domains by default or make them optional?
Maybe an attribute like punycode=False can disable the default behavior of allowing it?

comment:2 Changed 6 years ago by rlaager

Does the patch from #9764 solve this? If so, can this be marked as a duplicate of that one?

comment:3 Changed 5 years ago by claudep

  • Resolution set to fixed
  • Status changed from new to closed

I confirm this has been fixed by other tickets. Closing.

Note: See TracTickets for help on using tickets.
Back to Top