Skip to content

Url Validation #155

Closed
Closed

Description

@devikasondhi

Hello,

Here are some scenarios where url shows unexpected behaviour:

  1. url('http://:[email protected]:80/path') returns True while it should throw ValidationFailure as it is invalid userinfo and password format (missing user). A valid one: http://user:[email protected]:80/path
  2. no check on ports above max limit of 16-bit unsigned integer: validation http://example.rocks:65536/ should fail
  3. http://www.example.org/../world is invalid but url gives True. http://www.example.org/.. also should be invalid
  4. A test from validators library, http://a.b--c.de/ should be valid as per https://tools.ietf.org/html/rfc3986#page-49 but it throws ValidationFailure

Activity

  1. kvesteri commented on Apr 13, 2020

    @kvesteri
    Collaborator

    PRs welcome with unit test cases covering all the aforementioned scenarios

  2. koaning commented on Jul 25, 2020

    @koaning

    I've also noticed a strange instance.

    import validators
    # this is true
    validators.url('https://player.vimeo.com/video/https://vimeo.com/439727448')

    I'll keep the PR in mind. I'll see if I've got some time for it, I really like the idea of this package :)

  3. koaning commented on Jul 25, 2020

    @koaning

    Would we be open to checking if the URL exists? We could send a request and check if we get an appropriate status back. It might make for a nice smoke test if nothing else.

    I'd add this as an optional parameter to the current url method or as a seperate function altogether. If folks think this is a good/bad idea: I'm certainly open to feedback on this one.

  4. kvesteri commented on Jul 26, 2020

    @kvesteri
    Collaborator

    Would we be open to checking if the URL exists? We could send a request and check if we get an appropriate status back. It might make for a nice smoke test if nothing else.

    I'd add this as an optional parameter to the current url method or as a seperate function altogether. If folks think this is a good/bad idea: I'm certainly open to feedback on this one.

    Personally I think this is out of scope of this library.

  5. koaning commented on Jul 26, 2020

    @koaning

    That's fair. If I figure out a neat solution to the url regex I'll report back with a PR.

  6. added
    bugIssue: Works not as designed
    outdatedIssue/PR: Open for more than 3 months
    on Mar 14, 2023
  7. 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