protovalidate icon indicating copy to clipboard operation
protovalidate copied to clipboard

[Feature Request] Accept IPv6 addresses with zone identifier and IPv6 mapped IPv4 in isHostAndPort function

Open katevi opened this issue 10 months ago • 2 comments

Hello!

Feature description: For now isHostAndPort function which can be used in proto for validation of host and port correctness, does not accept IPv6 addresses of the following form:

  1. [fd00:1234:5678::1%dummy0]:9090 , which is supported in standard net package
  2. [::ffff:0:127.0.0.1]:8080 - IPv6 mapped IPv4 addresses described in RFC-4291, which is also accepted in standard net package when creating net.Listener

Problem it solves or use case: If the function supports such addresses, users will not have to write their own validation rules using CEL.

Thank you very much!

katevi avatar Apr 18 '25 09:04 katevi

Hey @katevi, both forms will be supported in the near future. You can follow https://github.com/bufbuild/protovalidate-go/pull/202 to keep in the loop. For context, also see https://github.com/bufbuild/protovalidate/pull/320.

timostamm avatar Apr 18 '25 09:04 timostamm

Moving to the main protovalidate repo as this impacts all implementations

rodaine avatar Apr 21 '25 17:04 rodaine

Closing this issue as this has been completed for all implementations.

smaye81 avatar May 29 '25 21:05 smaye81