Fix is_valid_ip_address() to handle incorrect paddings#99624
Closed
MarcusPaulsson wants to merge 1 commit into
Closed
Fix is_valid_ip_address() to handle incorrect paddings#99624MarcusPaulsson wants to merge 1 commit into
is_valid_ip_address() to handle incorrect paddings#99624MarcusPaulsson wants to merge 1 commit into
Conversation
is_valid_ip_address() to handle incorrect paddings
721c0d7 to
e407393
Compare
Your meaningful commit message clang_format
e407393 to
cf7fc7a
Compare
Contributor
|
This seems like a good opportunity to bring your test suite into the unit tests of the engine: https://github.com/godotengine/godot/blob/0c45ace151f25de2ca54fe7a46b6f077be32ba6f/tests/core/string/test_string.h Should likely be done as a separate PR after this one. |
Member
|
Superseded by #114827. Thanks for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal to Fix Inconsistent Behavior in is_valid_ip_address() for IPv6 Addresses with Multiple ::
Fixes: #99623
This pull request resolves inconsistent behavior in the is_valid_ip_address() method when validating IPv6 addresses. Specifically, it addresses the following issues:
Old behavior:

New behavior:

The updated is_valid_ip_address() method tracks :: with double_colon_index, ensuring only one occurrence. It validates segment counts, handles compressed zeros logically, and strictly enforces IPv4-mapped segments in the final position.