Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter to set max entities #555

Merged
merged 5 commits into from
Sep 2, 2024
Merged

Conversation

dr0i
Copy link
Member

@dr0i dr0i commented Aug 30, 2024

Resolves #554.

@dr0i dr0i requested a review from blackwinter August 30, 2024 12:47
@dr0i dr0i added Flux and removed Flux labels Aug 30, 2024
Copy link
Member

@blackwinter blackwinter left a comment

Choose a reason for hiding this comment

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

You're setting the limit globally which affects all subsequently instantiated XMLReaders. It's probably better to limit the effects to the current XmlDecoder instance by using the XML API instead (untested):

private static final String TOTAL_ENTITY_SIZE_LIMIT = "http://www.oracle.com/xml/jaxp/properties/totalEntitySizeLimit"

public XmlDecoder(final String totalEntitySizeLimit) {
    // ...
    saxReader.setProperty(TOTAL_ENTITY_SIZE_LIMIT, totalEntitySizeLimit);
}

@blackwinter blackwinter assigned dr0i and unassigned blackwinter Aug 30, 2024
dr0i added 2 commits August 30, 2024 15:38
This has lesser implications. Also, some more declarations can be made "final".
Thx @blackwinter.
This brings the comment of how to set the variable to allow unlimited entities
into flux-commands.md.
@dr0i
Copy link
Member Author

dr0i commented Aug 30, 2024

Usage of XML API is definitley an improvement here - thx ! Updated in ee17957.

@dr0i dr0i assigned blackwinter and unassigned dr0i Aug 30, 2024
@dr0i dr0i requested a review from blackwinter August 30, 2024 13:50
@blackwinter blackwinter assigned dr0i and unassigned blackwinter Aug 30, 2024
@dr0i
Copy link
Member Author

dr0i commented Sep 2, 2024

Thx for the suggestion!

@dr0i dr0i merged commit 57f9344 into master Sep 2, 2024
1 check passed
@dr0i dr0i deleted the 554-addParameterToSetMaxEntities branch September 2, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

FEATURE_SECURE_PROCESSING threshold too low in XmlDecoder
2 participants