This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git
The following commit(s) were added to refs/heads/main by this push:
new b3ee6cc7d feat(java): update AllowListChecker to include checks
against disallowed and allowed class lists (#3850)
b3ee6cc7d is described below
commit b3ee6cc7d83ddce5f0a16778393eba8ea750191f
Author: Eryan <[email protected]>
AuthorDate: Wed Jul 15 15:23:27 2026 +0800
feat(java): update AllowListChecker to include checks against disallowed
and allowed class lists (#3850)
## Why?
## What does this PR do?
## Related issues
## AI Contribution Checklist
- [ ] Substantial AI assistance was used in this PR: `yes` / `no`
- [ ] If `yes`, I included a completed [AI Contribution
Checklist](https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs)
in this PR description and the required `AI Usage Disclosure`.
- [ ] If `yes`, my PR description includes the required `ai_review`
summary and screenshot evidence or equivalent persisted links of the
final clean AI review results from both fresh reviewers described in
`AI_POLICY.md`, the Fory-guided reviewer and the independent general
reviewer, on the current PR diff or current HEAD after the latest code
changes.
## Does this PR introduce any user-facing change?
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
---------
Co-authored-by: chaokunyang <[email protected]>
---
.../src/main/java/org/apache/fory/resolver/AllowListChecker.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/java/fory-core/src/main/java/org/apache/fory/resolver/AllowListChecker.java
b/java/fory-core/src/main/java/org/apache/fory/resolver/AllowListChecker.java
index 693cc6f75..235e58850 100644
---
a/java/fory-core/src/main/java/org/apache/fory/resolver/AllowListChecker.java
+++
b/java/fory-core/src/main/java/org/apache/fory/resolver/AllowListChecker.java
@@ -113,8 +113,12 @@ public class AllowListChecker implements TypeChecker {
Tuple2<String, Integer> componentInfo =
TypeUtils.getArrayComponentInfo(className);
String componentName = componentInfo.f0;
if (componentName != null) {
- disallowed |= containsPrefix(disallowList, disallowListPrefix,
componentName);
- allowed |= containsPrefix(allowList, allowListPrefix, componentName);
+ disallowed |=
+ containsPrefix(disallowList, disallowListPrefix, componentName)
+ || DisallowedList.contains(componentName);
+ allowed |=
+ containsPrefix(allowList, allowListPrefix, componentName)
+ || DefaultJdkClassAllowList.contains(componentName);
}
}
switch (checkLevel) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]