A stricter ipv4 format #271
Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
Sure, format/ipv4 is following a particular standard. However, because of different API implementations the code is often forced to strip out any leading prefixes from each IPv4 part. |
Beta Was this translation helpful? Give feedback.
-
The current
ipv4
format type allows zero-prefixes in the octets.When these are consumed by whatever code requires the field they can often go through API functions that treat the zero-prefix octet as an octal value. This can lead to obvious misconfiguration.
Although it's relatively trivial to provide a custom pattern, it would be nice if a stricter ipv4 formatter was available in the specification.
Beta Was this translation helpful? Give feedback.
All reactions