Improve encryption metadata validation - #925
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves Java encryption metadata safety and class validation.
Changes:
- Restricts and validates encryption class loading.
- Bounds encryption-key metadata parsing with localized errors.
- Adds regression tests for class and key-length validation.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
EncryptTest.java |
Adds validation regression tests. |
TsFileMetadata.java |
Validates key size before allocation. |
IEncryptor.java |
Uses validated encryption classes. |
IDecryptor.java |
Uses validated encryption classes. |
EncryptUtils.java |
Restricts class loading and bounds keys. |
messages.properties |
Adds English validation messages. |
messages_zh.properties |
Adds Chinese validation messages. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #925 +/- ##
===========================================
+ Coverage 61.26% 61.32% +0.06%
===========================================
Files 746 746
Lines 51560 51583 +23
Branches 8353 8357 +4
===========================================
+ Hits 31586 31635 +49
+ Misses 18359 18324 -35
- Partials 1615 1624 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
LGTM |
ColinLeeo
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests
./mvnw test -P with-java -pl java/tsfile -am -Dtest=EncryptTest,TsFileMetadataTest -Dsurefire.failIfNoSpecifiedTests=false