Skip to content

Add null data check for encrypt input debugging#85

Merged
jgowdy-godaddy merged 1 commit intomainfrom
debug-testing
Mar 6, 2026
Merged

Add null data check for encrypt input debugging#85
jgowdy-godaddy merged 1 commit intomainfrom
debug-testing

Conversation

@jgowdy-godaddy
Copy link
Contributor

Summary

  • Add NullDataCheck config option (JSON or ASHERAH_NULL_DATA_CHECK env var) to detect null input data during encryption
  • When enabled, logs an error if the first 64 bytes of the input buffer are all null before encryption (caller passed bad data) or after encryption (buffer was zeroed during the operation)
  • Proceeds with encryption regardless to avoid runtime disruption — this is diagnostic logging only

Test plan

  • All existing tests pass
  • Build succeeds on Go 1.24

🤖 Generated with Claude Code

Add NullDataCheck config option that, when enabled, logs an error if
the input data buffer is all null before or after encryption. This
helps diagnose issues where callers report decrypted data is all nulls.
@jgowdy-godaddy jgowdy-godaddy merged commit 8ec6ddd into main Mar 6, 2026
4 checks passed
@jgowdy-godaddy jgowdy-godaddy deleted the debug-testing branch March 6, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants