Skip to content
Closed
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
Binary file modified .jules/sentinel.md
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public void validateOrThrow(MultipartFile file, PolicyOverrideRequest overrideRe
}

String fileName = file.getOriginalFilename();
if (fileName != null && fileName.indexOf('\u0000') != -1) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

HIGH OpenCode could not establish approval sufficiency

  • Problem: the model pool exhausted without a valid current-head review control block, so this changed line cannot be approved from deterministic check state alone.
  • Impact: PR-intent mismatches, missing files, robustness bugs, UX/DX regressions, and CodeGraph-backed flow changes could be missed.
  • Fix: rerun OpenCode after model availability recovers, or add the missing source/test/docs/generated verification evidence needed for a source-backed approval.
  • Verification: rerun the OpenCode Review workflow and confirm it emits APPROVE or source-backed REQUEST_CHANGES for this head SHA.

throw new IllegalArgumentException(
"Invalid filename containing null byte.");
}
String extension = extensionOf(fileName);
if (extension.isEmpty()) {
throw new IllegalArgumentException("File extension is required.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,22 @@ void rejectsBlankFilenameOrMissingName() {
);
}

@Test
void rejectsFilenameWithNullByte() {
ConversionProperties conversionProperties = new ConversionProperties();
conversionProperties.setBlockedExtensions(Set.of("hwp", "hwpx"));
DefaultDocumentValidationService validationService = new DefaultDocumentValidationService(conversionProperties);

IllegalArgumentException ex = assertThrows(
IllegalArgumentException.class,
() -> validationService.validateOrThrow(
new MockMultipartFile("file", "contract\u0000.pdf", "application/octet-stream", new byte[] {1})
)
);

assertEquals("Invalid filename containing null byte.", ex.getMessage());
}

@Test
void rejectsNullFilename() {
ConversionProperties conversionProperties = new ConversionProperties();
Expand Down