Skip to content

Releases: gorilla/schema

v1.4.1

29 Jun 20:36
cd59f2f
Compare
Choose a tag to compare

Security Release

Fixes an issue where sparse slice deserialization can cause memory exhaustion CVE-2024-37298

Thanks to @AlexVasiluta for the report and following responsible disclosure.

Full Changelog: v1.4.0...v1.4.1

v1.4.0

15 Jun 03:43
180f71e
Compare
Choose a tag to compare

What's Changed

  • feat: if a different type in slice, raise error by @lll-lll-lll-lll in #212
  • fixed panic: reflect: indirection through nil pointer to embedded struct by @morus12 in #211

New Contributors

Full Changelog: v1.3.0...v1.3.1

v1.3.0

26 Mar 22:48
Compare
Choose a tag to compare

What's Changed

  • Remove log.Fatal() usage in encoder.go by @h2570su in #207
  • Add default tag by @zak905 in #183
  • update readme: add informations about the default tag option usage by @zak905 in #209

New Contributors

Full Changelog: v1.2.1...v1.3.0

Release v1.2.1

05 Nov 02:24
9dff76b
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.0...v1.2.1

v1.2.0

22 Aug 21:08
7f62815
Compare
Choose a tag to compare

Fixes a case where schema panicked when provided a pointer to embedded structs.

CHANGELOG

Fine-grained decoding errors

22 Mar 17:01
124d17e
Compare
Choose a tag to compare

Decoding errors now have types for more comprehensive error reporting:

  • UnknownKeyError is returned when an unknown key is encountered in the source map and the decoder is not set to ignore unknown keys.
  • EmptyFieldError is returned when a required field is empty.

Both error types have a Key attribute that can be inspected to determine the field that caused the error.

Fix handling of empty values for types that implement TextUnmarshaler

21 Mar 16:34
Compare
Choose a tag to compare
Fix handling of empty value. (#104)

If a value is decoding into a type that implements the
encoding.TextUnmarshaler interface, the decoder should use it's
UnmarshalText method in all instances including an empty value.

Previously, would ignore the method decoding the field as the empty
value of the type.

v1.0.1: Fix slice of structs TextUnmarshaler. (#103)

07 Mar 15:52
Compare
Choose a tag to compare
Fix handling of situation where a slice of structs implments the
encoding.TextUnmarshaler interface, previously it would return "invalid
path" error.

Includes, some minor refactoring and documentation to clarify
`isUnmarshaler` output.