Test-IsADUserPasswordCompromised: Getting error "The output char buffer is too small to contain the decoded characters" for some user accounts
See original GitHub issueThanks for providing this great piece of software 😃
I noticed a bug in the Test-IsADUserPasswordCompromised Cmdlet. For some user accounts (not sure what’s different about them), the Test-IsADUserPasswordCompromised
does not work.
Full error message below.
System.ArgumentException: The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'.
Parameter name: chars
at System.Text.Encoding.ThrowCharsOverflow()
at System.Text.Encoding.ThrowCharsOverflow(DecoderNLS decoder, Boolean nothingDecoded)
at System.Text.UTF8Encoding.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, DecoderNLS baseDecoder)
at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex, Boolean flush)
at System.Text.DecoderNLS.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex)
at System.IO.BinaryReader.InternalReadOneChar()
at System.IO.BinaryReader.PeekChar()
at DSInternals.Common.Data.KeyCredential..ctor(Byte[] blob)
at DSInternals.Common.Data.DSAccount.LoadKeyCredentials(DirectoryObject dsObject)
at DSInternals.Common.Data.DSAccount..ctor(DirectoryObject dsObject, DirectorySecretDecryptor pek)
at DSInternals.Replication.DirectoryReplicationClient.GetAccount(Guid objectGuid)
at Lithnet.ActiveDirectory.PasswordProtection.PowerShell.TestIsADUserPasswordCompromised.ProcessRecord() in D:\dev\git\lithnet\ad-password-protection\src\PasswordProtectionPS\TestIsADUserPasswordCompromised.cs:line 55
Issue Analytics
- State:
- Created a year ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
The output char buffer is too small" when reading ...
ArgumentException : The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' is known to be related to ......
Read more >The output char buffer is too small to contain the decoded ...
When encountering the error message “The output char buffer is too small to contain the decoded characters,” it means that the buffer used...
Read more >"The output char buffer is too small to contain the decoded ...
Sometimes i get an exception: The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System ...
Read more >Output char buffer is too small
The message is: The output char buffer is too small to contain the decoded characters, encoding 'Unicode' fallback 'System.Text.
Read more >[A19] Frequent "player data" or "in load chunk" errors
Text.DecoderReplacementFallback'. Parameter name: chars ArgumentException: The output char buffer is too small to contain the decoded characters ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok I’ll try making a new build with the latest DS internals library embedded - it seems like the issue must have been resolved.
Thanks for confirming. I’ve published the build containing this fix.
https://github.com/lithnet/ad-password-protection/releases/tag/v1.0.7239