Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept only 4 decimal octet IPv4 addresses. Support IPv4 addresses with unicode dots. #292

Merged
merged 7 commits into from
May 26, 2023

Conversation

elliotwutingfeng
Copy link
Contributor

@elliotwutingfeng elliotwutingfeng commented May 25, 2023

Changes

ipaddress.IPv4Address was not used as fallback because it is 5 times slower than regex, and its behavior is inconsistent across Python versions 3.8 and 3.9 (w.r.t. recognition of leading zeroes). For example, on Raspberry Pi OS Bullseye, the latest Python version is 3.9.2-3, which allows leading zeroes. To update to the latest patch version of Python 3.9, one has to manually install from source.

Copy link
Owner

@john-kurkowski john-kurkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff.

tldextract/remote.py Show resolved Hide resolved
@john-kurkowski john-kurkowski merged commit 1385434 into john-kurkowski:master May 26, 2023
@john-kurkowski
Copy link
Owner

Thank you!

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Oct 23, 2023
https://build.opensuse.org/request/show/1119465
by user mia + anag+factory
- Update to 5.0.1:
Bugfixes:
  * Indicate MD5 not used in a security context (FIPS compliance)
    #gh/john-kurkowski/tldextract#309
Misc.:
  * Increase typecheck aggression
- Changes in 5.0.0:
Breaking Changes:
  * Migrate `ExtractResult` from `namedtuple` to `dataclass`
    #gh/john-kurkowski/tldextract#306
Bugfixes:
  * Drop support for EOL Python 3.7
- Changes in 4.0.0:
Breaking Bugfixes:
  * Always include suffix if private suffix enabled and private
    suffix exists
    #gh/john-kurkowski/tldextract#300
- Changes in 3.5.0:
Features:
  * Support IPv6 addresses
    #gh/john-kurkowski/tldextract#298
Bugfixes:
  * Accept only 4 decimal octet IPv4 addresses
    #gh/john-kurkowski/tldextract#292
  * Support IPv4 addresses with unicode dots
  * Reject IPv4 addresses with trailing whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1,2,3-octet/hexadecimal hostnames detected as IPv4 addresses IPv4 with non-ASCII dots
2 participants