Skip to content

feat(java): make DefaultJdkClassAllowList public#3849

Merged
chaokunyang merged 3 commits into
apache:mainfrom
eryanwcp:main
Jul 15, 2026
Merged

feat(java): make DefaultJdkClassAllowList public#3849
chaokunyang merged 3 commits into
apache:mainfrom
eryanwcp:main

Conversation

@eryanwcp

@eryanwcp eryanwcp commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

…trieve allowed class names

Why?

Cause: org.apache.fory.exception.InsecureException: Class java.io.Serializable isn't in the allow list for serialization or deserialization. If this class is allowed, add it with AllowListChecker#allowClass

 AllowListChecker checker = new AllowListChecker(AllowListChecker.CheckLevel.STRICT);
 checker.allowClasses(DefaultJdkClassAllowList.getAllowClasses());

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

@eryanwcp eryanwcp requested a review from chaokunyang as a code owner July 15, 2026 04:11
*
* @return Set of allowed class names
*/
public static Set<String> getAllowClasses() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update AllowListChecker to add those classes by default?

@chaokunyang

Copy link
Copy Markdown
Collaborator

@eryanwcp could you fix ci error

@chaokunyang chaokunyang merged commit 477bcb8 into apache:main Jul 15, 2026
61 checks passed
@chaokunyang chaokunyang changed the title feat(java): make DefaultJdkClassAllowList public and add method to re… feat(java): make DefaultJdkClassAllowList public Jul 15, 2026
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