Repository navigation
Fix: Do not write sensitive data into log - #4373
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Malformed payloads can still expose decrypted key material through logged property names, and the tests lack log-capture assertions to detect such leaks.
2 open issues
What changed in this PR
This PR reduces exposure of key material in Cryptomator’s logs and error dialogs by changing recovery-key validation messages and Hub key-loading diagnostics.
Changes:
- Replace recovery words in exception messages with word counts or positions.
- Replace full decrypted JWE payload logging with header and field-name diagnostics.
- Add regression tests for recovery-word disclosure in exceptions.
| File | Description |
|---|---|
src/test/java/org/cryptomator/ui/recoverykey/WordEncoderTest.java |
Tests that invalid-input exceptions do not expose recovery words. |
src/main/java/org/cryptomator/ui/recoverykey/WordEncoder.java |
Removes recovery words from validation errors. |
src/main/java/org/cryptomator/ui/keyloading/hub/JWEHelper.java |
Changes diagnostics to avoid logging full decrypted payloads. |
Review effort: Balanced
|
No actionable comments were generated in the recent review.
|
only field count Co-authored-by: Copilot Autofix powered by AI <[email protected]>


This PR fixes bugs regarding leakage of key material into log files/user dialogs