Skip to content

Reject malformed port values#192

Draft
Mirochill wants to merge 1 commit into
python-hyper:masterfrom
Mirochill:fix-180-strict-port-digits
Draft

Reject malformed port values#192
Mirochill wants to merge 1 commit into
python-hyper:masterfrom
Mirochill:fix-180-strict-port-digits

Conversation

@Mirochill
Copy link
Copy Markdown

Summary

Reject URL port values unless they are made only of ASCII decimal digits before converting them with int().

This prevents URL.from_text() from accepting malformed ports that Python's int() may otherwise parse, such as values with whitespace, signs, underscores, or Unicode digits.

Fixes #180.

Validation

Local tests were not run because this workspace policy forbids running third-party project tests locally.

Static validation allowed by the workspace policy:

  • git diff --check HEAD~1..HEAD

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.

Non-numeric port parsing issue

1 participant