Skip to content

URL validation fails on Russian punycode TLD #63

@ghost

Description

>>> url('http://президент.рф/')
ValidationFailure(func=url, args={'public': False, 'value': 'http://\xd0\xbf\xd1\x80\xd0\xb5\xd0\xb7\xd0\xb8\xd0\xb4\xd0\xb5\xd0\xbd\xd1\x82.\xd1\x80\xd1\x84/'})
>>> url('http://xn--d1abbgf6aiiy.xn--p1ai/')
ValidationFailure(func=url, args={'public': False, 'value': 'http://xn--d1abbgf6aiiy.xn--p1ai/'})

Yet these are valid URLs, see https://en.wikipedia.org/wiki/.%D1%80%D1%84

The domain has an ASCII representation of xn--p1ai derived as Punycode

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue: Works not as designedoutdatedIssue/PR: Open for more than 3 months

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions