Skip to content

Conversation

@PrIzRaKDev
Copy link

Rewrites the IP validation logic to correctly handle IPv6 and IPv4. Prevents false positives such as 2001:db8:::1 and improves overall compliance with standard IP formatting rules.

Before:

before.mp4

After:

after.mp4

Closes #112511

Rewrites the IP validation logic to correctly handle IPv6 and IPv4.
Prevents false positives such as 2001:db8:::1 and improves overall compliance with standard IP formatting rules.

Closes godotengine#112511
@PrIzRaKDev PrIzRaKDev requested a review from a team as a code owner November 8, 2025 18:49
@Ivorforce
Copy link
Member

Ivorforce commented Nov 8, 2025

Hello, thank you for opening a pull request!

I'm noticing your code doesn't respect our code guidelines, please have a look and review your pull request: https://contributing.godotengine.org/en/latest/engine/guidelines/index.html

It may be especially worthwhile for you to set up a pre-commit hook.

While I haven't reviewed the code yet in detail, I have a gut feeling that it can be simplified. The old code (albeit not always correct, going by the linked issue) seemed to have done a decent job with a lot less logic. I'm guessing it will be possible to keep a similar amount of complexity for the fix.

@PrIzRaKDev
Copy link
Author

Hello, thank you for opening a pull request!

I'm noticing your code doesn't respect our code guidelines, please have a look and review your pull request: https://contributing.godotengine.org/en/latest/engine/guidelines/index.html

While I haven't reviewed the code yet, I have a gut feeling that the code can be simplified. The old code (albeit not always correct) seemed to have done a decent job with a lot less logic. I'm guessing it will be possible to keep a similar amount of complexity for the fix.

Hello. Okay, I will take your comments into account and correct the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPv6 address validation accepts invalid addresses

3 participants