Skip to content

Url validator mishandles upper case and repeated hyphens. #27

Closed

Description

@scole-scea

I claim both of these should work:

Case-insensitivity in hostnames:

>>> validators.url('http://www.GOOGLE.com/')
ValidationFailure(func=url, args={'public': False, 'value': 'http://www.GOOGLE.com/'})

Ref: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names

Multiple sequential hyphens:

>>> validators.url('http://xn--bcher-kva.ch/')
ValidationFailure(func=url, args={'public': False, 'value': 'http://xn--bcher-kva.ch/'})

Ref: https://en.wikipedia.org/wiki/Internationalized_domain_name#Example_of_IDNA_encoding

Activity

  1. scole-scea commented on Jul 6, 2016

    @scole-scea
    Author

    Also trailing dots should be valid for hostnames.
    Ref: http://www.dns-sd.org/trailingdotsindomainnames.html

  2. added
    bugIssue: Works not as designed
    maintenancePR: Alters existing source code
    outdatedIssue/PR: Open for more than 3 months
    and removed
    maintenancePR: Alters existing source code
    on Mar 14, 2023
  3. added a commit that references this issue on Mar 17, 2023
    c43826c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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