Title: URL validator fails with one digit port · Issue #84 · python-validators/validators · GitHub
Open Graph Title: URL validator fails with one digit port · Issue #84 · python-validators/validators
X Title: URL validator fails with one digit port · Issue #84 · python-validators/validators
Description: URL validator fails when validating urls with one digit port >>> validators.url("http://google.com/test") True >>> validators.url("http://google.com:80/test") True >>> validators.url("http://google.com:10/test") True >>> validators.url("...
Open Graph Description: URL validator fails when validating urls with one digit port >>> validators.url("http://google.com/test") True >>> validators.url("http://google.com:80/test") True >>> validators.url("http://google...
X Description: URL validator fails when validating urls with one digit port >>> validators.url("http://google.com/test") True >>> validators.url("http://google.com:80/test") ...
Opengraph URL: https://github.com/python-validators/validators/issues/84
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"URL validator fails with one digit port","articleBody":"URL validator fails when validating urls with one digit port\r\n```\r\n\u003e\u003e\u003e validators.url(\"http://google.com/test\")\r\nTrue\r\n\u003e\u003e\u003e validators.url(\"http://google.com:80/test\")\r\nTrue\r\n\u003e\u003e\u003e validators.url(\"http://google.com:10/test\")\r\nTrue\r\n\u003e\u003e\u003e validators.url(\"http://google.com:9/test\")\r\nValidationFailure(func=url, args={'public': False, 'value': 'http://google.com:9/test'})\r\n\u003e\u003e\u003e validators.url(\"http://google.com:8/test\")\r\nValidationFailure(func=url, args={'public': False, 'value': 'http://google.com:8/test'})\r\n\u003e\u003e\u003e validators.url(\"http://google.com:7/test\")\r\nValidationFailure(func=url, args={'public': False, 'value': 'http://google.com:7/test'})\r\n\u003e\u003e\u003e validators.url(\"http://google.com:2/test\")\r\nValidationFailure(func=url, args={'public': False, 'value': 'http://google.com:2/test'})\r\n\u003e\u003e\u003e validators.url(\"http://google.com:1/test\")\r\nValidationFailure(func=url, args={'public': False, 'value': 'http://google.com:1/test'})\r\n\r\n```\r\n\r\nI think the problem is in this line, forcing the port number having 2 to 5 digits \r\nhttps://github.com/kvesteri/validators/blob/8cf1e8fb5ed3af3d428b0230c50d63d55dd0939a/validators/url.py#L45\r\n\r\n","author":{"url":"https://github.com/kdeltared","@type":"Person","name":"kdeltared"},"datePublished":"2018-05-28T15:18:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/84/validators/issues/84"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:00c32bba-c04f-a29f-e570-d68b4fa0980c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C250:1C0266:42BBF4:59FA10:698F10D5 |
| html-safe-nonce | baec2453bae3bda56b09045689c2865f8ffb48e06701316fa0ccd0a68aef244f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjUwOjFDMDI2Njo0MkJCRjQ6NTlGQTEwOjY5OEYxMEQ1IiwidmlzaXRvcl9pZCI6IjI5NDk0Njg3NjI1MTA2NTk3OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5e15905d894eafc4ffbda9c2955febd3d57db9d293e200577494ca16cc82c5c5 |
| hovercard-subject-tag | issue:327058837 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-validators/validators/84/issue_layout |
| twitter:image | https://opengraph.githubassets.com/47204e5cef8475a7fd2ce5646532186b87aae16a6d80fc9c53d6e68c74a00334/python-validators/validators/issues/84 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/47204e5cef8475a7fd2ce5646532186b87aae16a6d80fc9c53d6e68c74a00334/python-validators/validators/issues/84 |
| og:image:alt | URL validator fails when validating urls with one digit port >>> validators.url("http://google.com/test") True >>> validators.url("http://google.com:80/test") True >>> validators.url("http://google... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kdeltared |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2da1a0d1318592c9965539b12269c4641177dfabfc86c3807992efb13e1d96ff |
| turbo-cache-control | no-preview |
| go-import | github.com/python-validators/validators git https://github.com/python-validators/validators.git |
| octolytics-dimension-user_id | 113113270 |
| octolytics-dimension-user_login | python-validators |
| octolytics-dimension-repository_id | 13642984 |
| octolytics-dimension-repository_nwo | python-validators/validators |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13642984 |
| octolytics-dimension-repository_network_root_nwo | python-validators/validators |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d735bf238a2094bebd08cd3641a9ef4d1fe77e4b |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width