You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed decoding of some valid four-byte data pointers.
Fixed truncated or out-of-range results when decoding oversized integers.
Added NativeAOT and trimming support for C# model deserialization. The NuGet
package now includes a source generator for constructor-based and
property-based models, including models with annotated properties inherited
from abstract base records.
Added reflection-free source-generated activation for supported generic
collection and dictionary interfaces and concrete types, including closed
collection types used directly with Find<T> and FindAll<T>.
Reused immutable source-generated activation metadata across readers, reducing
the time and allocation cost of the first model lookup on a new reader.
Improved lookup performance and reduced allocations when creating collections
through reflection.
Enabled trim, AOT, and single-file compatibility analysis.
Added the MMDBSG001 through MMDBSG016 diagnostics, which report model
shapes the generator cannot support so that they are caught at build time
rather than after trimming or an AOT publish. They are reported by default in
any project that declares models; set the MaxMindDbAotDiagnostics MSBuild
property to false to turn them off.
Added the MaxMind.Db.SourceGeneratorSupport and MaxMind.Db.GeneratedMember
public types. They exist for generated code to call and are not intended to be
used directly.
Fixed a [MapKey(..., true)] member of a non-nullable value type throwing
during property-based activation instead of keeping its default. This affected
the reflection path before this release and is now consistent across both.
Added decoding limits to prevent crafted databases from consuming excessive
time and memory. Each lookup and metadata read allows at most 65,536 decoded
values, 512 nesting levels (including pointer follows), and 2 MiB of combined
string, bytes, uint32, uint64, and uint128 payload. Exceeding a limit or
encountering a pointer cycle throws InvalidDatabaseException. These limits
reject some previously accepted databases, including those with a string or
bytes value larger than 2 MiB. Available stack space can impose a lower
nesting limit.
Pointers that point directly to other pointers now throw InvalidDatabaseException.
Truncated or out-of-bounds data reads now throw InvalidDatabaseException
instead of ArgumentOutOfRangeException. This also prevents incorrect decoded
values on netstandard2.0. Update error handlers to catch InvalidDatabaseException.