ppkarwasz opened a new pull request, #5302: URL: https://github.com/apache/calcite/pull/5302
## Jira Link [CALCITE-7601](https://issues.apache.org/jira/browse/CALCITE-7601) ## Changes Proposed > [!NOTE] > This is a **fallback** PR. The preferred fix is upstream in JTS, where `GMLReader` would create its parser through Apache Commons Secure XML: locationtech/jts#1230. This PR is only needed if JTS does not adopt that change, or if Calcite cannot wait for a JTS release that includes it. `ST_GeomFromGML` no longer uses JTS's `GMLReader`, whose SAX parser resolves external entities. It parses the GML with a SAX parser from [Apache Commons Secure XML](https://commons.apache.org/proper/commons-secure-xml/) 1.0.0, which does not fetch external DTDs or entities, and passes the events to JTS's own `GMLHandler`. - The parser is not namespace-aware, like `GMLReader`, so GML fragments with an undeclared `gml:` prefix, such as the output of `ST_AsGML`, are still accepted. - A forbidden-apis rule rejects `GMLReader` and the plain JAXP SAX factory methods, so the unsecured path cannot come back. - There are no new XXE tests: the guarantees belong to Commons Secure XML and are tested there. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
