[ 
https://issues.apache.org/jira/browse/TIKA-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18019034#comment-18019034
 ] 

Tilman Hausherr edited comment on TIKA-4471 at 9/9/25 11:37 AM:
----------------------------------------------------------------

Three tests fail in Germany, this can be fixed with this code:
{code:java}
    private static Locale defaultLocale;

    @BeforeAll
    public static void startUp() {
        defaultLocale = Locale.getDefault();
        Locale.setDefault(Locale.US);
    }

    @AfterAll
    public static void tearDown() {
        Locale.setDefault(defaultLocale);
    }
{code}
Now only two tests (testSAXBillionLaughs and testDOMBillionLaughs) fail with 
"org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 106489; 
JAXP00010003: The length of entity "a" is "106,474" that exceeds the "100,000" 
limit set by "jdk.xml.maxGeneralEntitySizeLimit".

Surprisingly this doesn't happen if I run the tests with 2.0. I have openjdk 24 
from Azul.


was (Author: tilman):
Three tests fail in Germany, this can be fixed with this code:
{code:java}
    @BeforeAll
    public static void startUp() {
        defaultLocale = Locale.getDefault();
        Locale.setDefault(Locale.US);
    }

    @AfterAll
    public static void tearDown() {
        Locale.setDefault(defaultLocale);
    }
{code}
Now only two tests (testSAXBillionLaughs and testDOMBillionLaughs) fail with 
"org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 106489; 
JAXP00010003: The length of entity "a" is "106,474" that exceeds the "100,000" 
limit set by "jdk.xml.maxGeneralEntitySizeLimit".

Surprisingly this doesn't happen if I run the tests with 2.0. I have openjdk 24 
from Azul.

> Add unit tests for XMLReaderUtil to confirm secure configurations
> -----------------------------------------------------------------
>
>                 Key: TIKA-4471
>                 URL: https://issues.apache.org/jira/browse/TIKA-4471
>             Project: Tika
>          Issue Type: Task
>            Reporter: Tim Allison
>            Priority: Minor
>             Fix For: 4.0.0, 3.3.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to