.NET 10 Rejects Malformed LDAP VLV Strings That .NET 9 Silently Mangled
Microsoft introduced a breaking change in .NET 10 that causes VlvRequestControl to throw an EncoderFallbackException when an application passes unpaired UTF-16 surrogates as a virtual-list-view target. Previously, .NET 9 silently substituted the UTF-8 replacement character (EF BF BD) for invalid surrogates during serialization, which could cause LDAP queries to seek unintended positions in a sorted result set. The stricter behavior ensures the bytes sent over the wire accurately reflect the string provided by the caller. Developers can verify the difference using a single project targeting both net9.0 and net10.0 runtimes, calling VlvRequestControl.GetValue() without needing a live LDAP connection. Applications that have been passing malformed strings to VlvRequestControl must add input validation before upgrading to .NET 10.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in