Skip to content

Checking for valid IP address #2

Description

@devikasondhi

Hello,

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions