Skip to content

Commit b8fcc60

Browse files
committed
v1.9.20: audit round — security fixes, FFmpeg injection, queue allowlist
- core/llm.py: move Gemini API key from URL query to x-goog-api-key header; add _sanitize_url() to strip credentials from all HTTPError messages - core/motion_graphics.py: drop bogus `\:`/`\;` escaping inside single-quoted drawtext values that produced literal "\:" in rendered titles (3 sites) - routes/jobs_routes.py: add 19 missing async routes to _ALLOWED_QUEUE_ENDPOINTS (/audio/beats, /audio/mix, /video/transitions/*, /export/*, etc.) — previously all failed /queue/add silently with "Endpoint not queueable" - main.js: guard SSE onmessage and pollJob callbacks against stale events after cancelJob() so onJobDone() never fires for a cleared job - main.js: hoist 6 timer vars to IIFE scope so cleanupTimers has a stable reference chain independent of nested-function init order - core/audio_enhance.py: drop no-op `.cpu()` calls (return value discarded, does nothing — the `del` is what releases the GPU tensor) - core/animated_captions.py: unlink tmp_video when VideoWriter.isOpened() returns False (was leaking temp files on writer-init failure)
1 parent c27d024 commit b8fcc60

23 files changed

Lines changed: 1145 additions & 1082 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
- Lint: `ruff check opencut/` — codebase is fully clean, pre-commit enforces on every commit
182182

183183
## Version
184-
- Current: **v1.9.19**
184+
- Current: **v1.9.20**
185185
- All version strings: `pyproject.toml`, `__init__.py`, `CSXS/manifest.xml` (ExtensionBundleVersion + Version), `com.opencut.uxp/manifest.json`, `com.opencut.uxp/main.js` (VERSION const), `index.html` version display, README badge, `package.json`
186186
- Use `python scripts/sync_version.py --set X.Y.Z` to update all 19 targets at once (including UXP files and package.json)
187187
- Use `python scripts/sync_version.py --check` in CI to verify all targets match
@@ -1067,6 +1067,15 @@ Comprehensive multi-phase audit across all 138 files (~82,500 lines). 103 issues
10671067
- **4 new UXP Video features** — AI Upscale, Scene Detection, Style Transfer, Shorts Pipeline. Full HTML cards + JS handlers with job polling.
10681068
- **UXP stale version fixed** — Settings showed "1.9.2" hardcoded. Now synced via version script.
10691069

1070+
## v1.9.20 Audit Round (Security, Injection, Queue Allowlist, Race Guards)
1071+
- **Gemini API key URL leak**`core/llm.py` passed `?key={api_key}` in query string, which leaked through `_http_json()` HTTPError messages. Moved to `x-goog-api-key` header; added `_sanitize_url()` that strips query strings from all error messages.
1072+
- **motion_graphics drawtext colon injection** — 3 drawtext builders were escaping `:` and `;` inside single-quoted filter values, producing literal `\:` / `\;` in the rendered video (user text like "Chapter 1:" became "Chapter 1\:"). Inside single-quoted drawtext values only `\` and `'` need escaping. Removed the wrong escapes in `render_title_card`, `overlay_title`, and the typewriter word-reveal loop.
1073+
- **Queue allowlist missing 19 async routes**`_ALLOWED_QUEUE_ENDPOINTS` was out of sync: `/audio/beats`, `/audio/duck-video`, `/audio/effects/apply`, `/audio/gen/{tone,sfx}`, `/audio/isolate`, `/audio/mix`, `/audio/mix-duck`, `/audio/music-ai/{generate,melody}`, `/audio/pro/deepfilter`, `/audio/waveform`, `/export/{preset,thumbnails}`, `/social/upload`, `/video/broll-generate`, `/video/multimodal-diarize`, `/video/transitions/{apply,join}` all silently failed on `/queue/add`. All 19 added to allowlist (total 101 endpoints).
1074+
- **CEP SSE/poll cancel race**`es.onmessage` and `pollJob` callbacks could call `onJobDone()` for a job that `cancelJob()` had already cleared. Added `if (!currentJob || ...) return;` guard in both handlers so stale events after cancel are dropped.
1075+
- **audio_enhance GPU cleanup no-op**`audio.cpu()` / `mono.cpu()` were called without assignment before `del`, which creates a discarded CPU copy instead of freeing the GPU tensor. The `del` alone releases the reference; `.cpu()` was wasted work. Removed the no-op `.cpu()` calls.
1076+
- **animated_captions temp file leak on VideoWriter failure** — if `cv2.VideoWriter.isOpened()` returned False, the `tempfile.NamedTemporaryFile` created on line 168 was never unlinked. Added `os.unlink(tmp_video)` in the early-error branch.
1077+
- **main.js defensive timer hoist** — hoisted 6 timer variable declarations (`_statusTimer`, `_scanDebounceTimer`, `_projectMediaRetryTimer`, `editDebounceTimer`, `_alertTimer`, `_wsReconnectTimer`) to the outer IIFE scope so `cleanupTimers()` has a stable reference chain independent of nested-function initialization order.
1078+
10701079
## v1.9.8 Batch 40 (Schemas, OpenAPI, Test Fixes)
10711080
- **9 new response schemas** — WorkflowResult, ContextAnalysisResult, VideoAIResult, ShortsPipelineResult, DepthMapResult, BrollPlanResult, BatchResult, PluginListResult (22 total).
10721081
- **OpenAPI +15 endpoints** — typed response schemas for all AI video, depth, shorts, workflow, context routes.

Install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Write-Host " \___/| .__/ \___|_| |_|\____\__,_|\__|" -ForegroundColor Cyan
155155
Write-Host " |_| " -ForegroundColor Cyan
156156
Write-Host ""
157157
Write-Host " Open Source Video Editing Automation" -ForegroundColor DarkGray
158-
Write-Host " Installer v1.9.19" -ForegroundColor DarkGray
158+
Write-Host " Installer v1.9.20" -ForegroundColor DarkGray
159159

160160
$isAdmin = Test-IsAdmin
161161
if ($isAdmin) {

OpenCut.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; Fully self-contained installer — bundles server exe, ffmpeg, and CEP extension
33

44
#define MyAppName "OpenCut"
5-
#define MyAppVersion "1.9.19"
5+
#define MyAppVersion "1.9.20"
66
#define MyAppPublisher "SysAdminDoc"
77
#define MyAppURL "https://github.com/SysAdminDoc/OpenCut"
88

extension/com.opencut.panel/CSXS/manifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<ExtensionManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
Version="7.0"
44
ExtensionBundleId="com.opencut.panel"
5-
ExtensionBundleVersion="1.9.19"
5+
ExtensionBundleVersion="1.9.20"
66
ExtensionBundleName="OpenCut">
77

88
<ExtensionList>
9-
<Extension Id="com.opencut.panel.main" Version="1.9.19" />
9+
<Extension Id="com.opencut.panel.main" Version="1.9.20" />
1010
</ExtensionList>
1111

1212
<ExecutionEnvironment>

extension/com.opencut.panel/client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3513,7 +3513,7 @@ <h3 class="media-sidecar-title">No media in the workspace yet.</h3>
35133513
<div class="card-header"><div class="card-title" data-i18n="settings.about">About OpenCut</div></div>
35143514
<div class="settings-row">
35153515
<span class="settings-label">Version</span>
3516-
<span class="settings-value">1.9.19</span>
3516+
<span class="settings-value">1.9.20</span>
35173517
</div>
35183518
<div class="about-links">
35193519
<a href="https://github.com/SysAdminDoc/opencut" class="about-link" target="_blank">GitHub</a>

0 commit comments

Comments
 (0)