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

Reject IPv4 addresses with trailing whitespaces + non-whitespaces #293

Merged
merged 12 commits into from
Jun 8, 2023

Conversation

elliotwutingfeng
Copy link
Contributor

Proposed changes

  • Reject edge cases where inputs like 1.1.1.1 com or 1.1.1.1\rsomething are parsed as IPv4 addresses. fullmatch is about 10% slower than match but it'll only affect systems that do not support pton (non-Unix/Windows).
  • Added some tests for test coverage.
  • Fixed a minor typo.

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.

Thank you!

tests/cli_test.py Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
@john-kurkowski john-kurkowski merged commit 570060d into john-kurkowski:master Jun 8, 2023
@elliotwutingfeng elliotwutingfeng deleted the coverage branch June 9, 2023 01:48
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.

2 participants