fix(tasks): add -- end-of-options separator to ocrmypdf command in convert_to_pdfa

The test_successful_conversion test asserts that '--' precedes the input/output
file paths in the ocrmypdf command as a security measure against argument
injection (file paths starting with '-' being interpreted as options).
The implementation was missing this separator, causing the test to fail and
triggering a downstream pytest INTERNALERROR (OSError: Bad file descriptor)
when pytest's terminal writer tried to report the failure.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/bd7ef195-4b30-456e-8118-5c200fb4bf45
This commit is contained in:
copilot-swe-agent[bot]
2026-03-24 00:11:04 +00:00
parent c7d3ec57c3
commit 7dec570ce6
+1
View File
@@ -78,6 +78,7 @@ def _convert_pdf_to_pdfa(input_path: str, output_path: str, pdfa_format: str = "
output_type, output_type,
"--quiet", "--quiet",
"--invalidate-digital-signatures", "--invalidate-digital-signatures",
"--", # end-of-options separator: prevents file paths from being interpreted as options
input_path, input_path,
output_path, output_path,
] ]