Fix incorrect IPv6 validation logic in String::is_valid_ip_address()#112554
Fix incorrect IPv6 validation logic in String::is_valid_ip_address()#112554PrIzRaKDev wants to merge 1 commit into
String::is_valid_ip_address()#112554Conversation
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
|
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. |
Hello. Okay, I will take your comments into account and correct the code. |
|
Superseded by #114827. Thanks for the contribution! |
Rewrites the IP validation logic to correctly handle IPv6 and IPv4. Prevents false positives such as
2001:db8:::1and improves overall compliance with standard IP formatting rules.Before:
before.mp4
After:
after.mp4
Closes #112511