security: fix HTML injection and improve error handling #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit addresses security and robustness issues identified during code review:
Fix HTML injection vulnerability: Added HTML escaping for file paths displayed in the CompleteDialog to prevent potential UI spoofing attacks. The output path is now properly escaped using html.escape() before being inserted into RichText labels (panek_video_program.py:131).
Improve FFmpeg text escaping: Enhanced the text overlay escaping to properly handle backslashes in addition to colons and quotes. This prevents potential issues with the FFmpeg drawtext filter (panek_video_program.py:231).
Add QProcess error handling: Connected the errorOccurred signal to provide clear error messages when FFmpeg fails to start. This improves user experience by surfacing errors like "ffmpeg not found" or "permission denied" instead of silent failures (panek_video_program.py:168, 195-210).
Note: The original Codex review referenced files from a different repository (Rust/TypeScript project), but similar vulnerabilities were found and fixed in this Python codebase.