You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation for assertValidHostname seems to be checking for validity of an IP address as well. However, the checks on ipv4 seem weak. For instance, the following are invalid, while the function does not throw any exception: 124.14.32.abc (invalid characters) 231.54.11.987 (range of last octet incorrect) 23.64.12 (incorrect number of octets)
Also, ipv6 does not seem to be supported. For instance, 2001:0438:FFFE:0000:0000:0000:0000:0A35 should be valid.
Okay, I have came up with a solution. The solution is not yet committed to the master yet. But the solution is that I have created assertValidIpAddress(String address).
I couldn't simply update assertValidHostname because those "invalid IP addresses" that you have listed above are technically valid full-qualifiied domain names.
I have also updated to accept IPv6 addresses.
I will close this issue when the update is merged into master branch.
Activity
tomansill commentedon Sep 28, 2020
Ok I will have a look at this. Thank you for the report.
tomansill commentedon Sep 28, 2020
Okay, I have came up with a solution. The solution is not yet committed to the master yet. But the solution is that I have created
assertValidIpAddress(String address).I couldn't simply update
assertValidHostnamebecause those "invalid IP addresses" that you have listed above are technically valid full-qualifiied domain names.I have also updated to accept IPv6 addresses.
I will close this issue when the update is merged into master branch.