question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test-IsADUserPasswordCompromised: Getting error "The output char buffer is too small to contain the decoded characters" for some user accounts

See original GitHub issue

Thanks 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:closed
  • Created a year ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ryannewingtoncommented, May 25, 2022

Ok I’ll try making a new build with the latest DS internals library embedded - it seems like the issue must have been resolved.

0reactions
ryannewingtoncommented, Jun 25, 2022

Thanks for confirming. I’ve published the build containing this fix.

https://github.com/lithnet/ad-password-protection/releases/tag/v1.0.7239

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found