hypothesis / hypothesis/h

URI normalization crashes when port not an int

Open
#5,605 2 comments 0 reactions 0 assignees View on GitHub
bug Python 3 S4 Sentry 💥
Dominant language
Python
Stars
3.2k
Forks
459
Avg merge
27d 1h
Merged PRs (30d)
1

Description

https://sentry.io/organizations/hypothesis/issues/978146793/?project=37293&referrer=github_plugin

```
ValueError: invalid literal for int() with base 10: 'chrome-extension'
(17 additional frame(s) were not displayed)
...
File "h/storage.py", line 232, in expand_uri
doc = models.Document.find_by_uris(session, [uri]).one_or_none()
File "h/models/document.py", line 88, in find_by_uris
query_uris = [uri_normalize(u) for u in uris]
File "h/util/uri.py", line 179, in normalize
netloc = _normalize_netloc(uri)
File "h/util/uri.py", line 205, in _normalize_netloc
port = uri.port
File "urlparse.py", line 113, in port
port = int(port, 10)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.