Skip to content

Commit

Permalink
[Misc] Fix the test for Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
tmortagne committed Dec 6, 2024
1 parent 3643ed5 commit 06c503c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void templateWithoutScriptRight() throws Exception
@Test
void templateCheatingProtection() throws Exception
{
when(this.environmentMock.getResource("/templates/../secure[]")).thenReturn(new URL("file://secure[]"));
when(this.environmentMock.getResource("/templates/../secure[]")).thenReturn(new URL("file://secure%5B%5D"));
when(this.environmentMock.getResourceAsStream("/templates/../template[]"))
.thenReturn(new ByteArrayInputStream("source".getBytes("UTF8")));

Expand Down

1 comment on commit 06c503c

@tmortagne
Copy link
Member Author

@tmortagne tmortagne commented on 06c503c Dec 17, 2024

Choose a reason for hiding this comment

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

Was for Java 21 (which apparently added validation for the input URL string), not Java 11.

Please sign in to comment.