Commit Graph
4 Commits
Author SHA1 Message Date
dualfroz dc5b09048d feat: add Sha256Str type 2026-10-02 16:29:33 +02:00
upstream 49b84acf1f Upstream pydantic/pydantic-extra-types state of the touched files before 7a922d82eb 2026-10-02 16:29:33 +02:00
dualfroz 996db5006c fix: reject MAC address octets with a sign or whitespace (#424)
MacAddress.validate_mac_address parsed each octet with int(part, 16),
which also accepts a leading +/- sign and surrounding whitespace. As a
result strings like -a:-b:-c:-d:-e:-f, +a:+b:+c:+d:+e:+f and
" a: b: c: d: e: f" were accepted, with the sign/whitespace variants
silently normalized into a valid-looking MAC the caller never supplied.

Require both characters of each octet to be hex digits before the int()
conversion so malformed octets raise the mac_address_format error like
other invalid input.
2026-09-06 00:23:06 +01:00
upstream dfa8240f1f Upstream pydantic/pydantic-extra-types state of the touched files before 20f7f79e31 2026-09-06 01:23:06 +02:00