Skip to content
New issue

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

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

Already on GitHub? # to your account

Disable XML processing limits correctly #41

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run the Maven verify phase
run: mvn -B verify -Dclirr.skip -Djdk.xml.xpathExprOpLimit=0 --file pom.xml
run: mvn -B verify -Dclirr.skip
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions Copyright [year] [name of copyright owner]".
*
* Copyright 2013-2016 ForgeRock AS.
* Portions copyright 2022 Wren Security.
*/
package org.forgerock.opendj.maven;

Expand Down Expand Up @@ -395,6 +396,9 @@ private String getXMLPackageDirectory() {
private void initializeStylesheets() throws TransformerConfigurationException {
getLog().info("Loading XSLT stylesheets...");
stylesheetFactory = TransformerFactory.newInstance();
stylesheetFactory.setAttribute("jdk.xml.xpathExprGrpLimit", "0");
stylesheetFactory.setAttribute("jdk.xml.xpathExprOpLimit", "0");
stylesheetFactory.setAttribute("jdk.xml.xpathTotalOpLimit", "0");
stylesheetFactory.setURIResolver(resolver);
stylesheetMetaJava = loadStylesheet("metaMO.xsl");
stylesheetMetaPackageInfo = loadStylesheet("package-info.xsl");
Expand Down