test: add -- separator assertions to rclone and ocrmypdf tests
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/c7ac9d75-d2de-499e-b7e8-8b0f694547f5
This commit is contained in:
@@ -38,6 +38,11 @@ class TestConvertPdfToPdfa:
|
||||
assert "pdfa-2" in cmd
|
||||
assert "--quiet" in cmd
|
||||
assert "--invalidate-digital-signatures" in cmd
|
||||
# SECURITY: Verify `--` end-of-options separator is present and precedes
|
||||
# the file paths to prevent option/argument injection.
|
||||
assert "--" in cmd
|
||||
assert cmd.index("--") < cmd.index("/input.pdf")
|
||||
assert cmd.index("--") < cmd.index("/output.pdf")
|
||||
assert "/input.pdf" in cmd
|
||||
assert "/output.pdf" in cmd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user