Skip to content

InetAddressMatchers.matchExternal() matches null and 0.0.0.0 #19072

@philwebb

Description

@philwebb

Describe the bug

InetAddressMatchers.matchExternal().build() returns a negated matchInternal() builder, however, I'm not sure that null or 0.0.0.0 should be classified as external addresses.

To Reproduce

InetAddressMatcher matcher = InetAddressMatchers.matchExternal().build();
assertThat(matcher.matches(null)).isFalse();
assertThat(matcher.matches("0.0.0.0")).isFalse();
assertThat(matcher.matches("::")).isFalse();

Expected behavior
See above

Sample
See above

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions