Files
pydantic-pydantic-extra-types/HISTORY.md
T
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

23 KiB

CHANGELOG

Latest Changes

  • fix(mac_address): reject MAC octets with a sign or whitespace (e.g. -a:..., +a:..., a:...) that int(..., 16) accepted.

2.11.2

2.11.1

2.11.0

2.10.6

2.10.5

2.10.4

2.10.3

2.10.2

2.10.1

2.10.0

Types

Refactor

Dependencies

2.9.0

Types

Refactor

  • Replace try-except block by if-else statement. PR #192 by @maxsos

Dependencies

  • ⬆ Bump the python-packages group with 4 updates. PR #194 by @dependabot

2.8.2

  • 🐛 Preserve timezone information when validating Pendulum DateTimes. #189 by @chrisguidry

2.8.1

Bug Fixes

  • 🐛 Fix Pendulum date time object to have correct typing. #184 by @07pepa

Types

  • ✨ Add parsing of pendulum_dt from unix time and non-strict parsing. #185 by @07pepa

2.8.0

Refactor

  • ♻️ refactor some functions & minor changes. #180 by @yezz123

Internal

Types

Dependencies

  • ⬆ Bump the python-packages group with 5 updates. PR #179 by @dependabot
  • ⬆ Bump the python-packages group with 4 updates. PR #171 by @dependabot

2.7.0

Dependencies

  • ⬆ Bump the python-packages group with 1 update. PR #150 by dependabot
  • ⬆ Bump the python-packages group with 6 updates. PR #160 by dependabot

2.6.0

  • Allow python-ulid 2.x on Python 3.9 and later. PR #131 by @musicinmybrain
  • Do not pin the ”major” version of pycountry. PR #132 by @musicinmybrain
  • 🤖 Create dependabot.yml for updating GitHub action. PR #134 by @yezz123
  • Refactor Documentation for ISBN and MAC address modules. PR #124 by @yezz123
  • Add language code definitions and test. PR #141 by @07pepa
  • Create a changelog to match release notes. PR #142 by @yezz123
  • Add currency code ISO 4217 and its subset that includes only currencies. PR #143 by @07pepa
  • 🔨 Update code formatting and linting configurations. PR #144 by @yezz123
  • 👷 Add Python checking for dependencies. PR #145 by @yezz123
  • 🐛 Fix single quote issue. PR #148 by @yezz123

2.5.0

2.4.1

2.4.0

2.3.0

2.2.0

2.1.0

2.0.0