Skip to content

Commit d22c6ba

Browse files
committed
fix: v1.9.4 — batch 36 audit (3 P0 crashes, 4 security, GPU rate limits, queue allowlist)
Full 4-agent audit across routes, core modules, frontend, and infrastructure. 130 findings triaged, 19 fixes applied: - P0: on_progress closures missing msg="" default in face enhance/swap/upscale - P0: engagement attribute access crash in shorts pipeline response - P0: broll_plan inconsistent 2-key vs 4-key API response - Security: style_arbitrary path traversal (missing validate_filepath) - Security: plugin install/uninstall path traversal + symlink escape - Security: depth_effects model_id injection (missing allowlist in 2 of 3 fns) - GPU: interpolate + basicvsr denoise bypassed ai_gpu rate limit - Queue: +9 newer routes missing from _ALLOWED_QUEUE_ENDPOINTS - Thread safety: engine registry cache reads/writes outside lock - Frontend: timer leak + safeFixed on zoom slider
1 parent 7cdacf1 commit d22c6ba

30 files changed

Lines changed: 876 additions & 469 deletions

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## [1.9.4] - 2026-03-27
4+
5+
### Fixed (Batch 36 Audit)
6+
- **P0: face_enhance/face_swap/upscale `_p(pct, msg)` crash** — 3 `on_progress` closures in video_ai.py missing `msg=""` default; core modules call with 1 arg → TypeError. Added default.
7+
- **P0: engagement attribute crash** — shorts pipeline response accessed `c.engagement.hook_strength` directly; switched to `getattr()` with defaults for all 5 engagement fields.
8+
- **P0: broll_plan inconsistent response** — empty segments returned 2 keys but success path returned 4; frontend expects all 4. Fixed + added `plan is None` guard + `getattr()` for all window fields.
9+
- **Security: style_arbitrary path traversal**`/video/style/arbitrary` accepted `style_image` without `validate_filepath()`; attacker could read arbitrary files. Added validation.
10+
- **Security: plugin install path traversal**`/plugins/install` accepted arbitrary `source` directory without `validate_path()`. Added validation.
11+
- **Security: plugin uninstall symlink escape**`/plugins/uninstall` didn't verify resolved `plugin_dir` stays within `PLUGINS_DIR`. Added `os.path.realpath()` containment check.
12+
- **Security: depth_effects model_id injection**`model_size` param interpolated into HuggingFace model ID without validation in `apply_bokeh_effect()` and `apply_parallax_zoom()`. Added allowlist in all 3 functions.
13+
- **GPU rate limiting gaps**`/video/ai/interpolate` and `/video/ai/denoise` (basicvsr method) bypassed `rate_limit("ai_gpu")`, allowing concurrent GPU OOM. Added guards.
14+
- **Queue allowlist +9 routes** — 9 newer routes missing from `_ALLOWED_QUEUE_ENDPOINTS`: interpolate, depth/map/bokeh/parallax, broll-plan, remove/watermark, upscale/run, multicam-xml, search/auto-index.
15+
- **title_overlay preset allowlist** — Missing `lower_third`, `countdown`, `kinetic_bounce` presets (present in title_render but not title_overlay).
16+
- **Engine registry cache race**`_availability_cache` reads/writes in `get_available_engines()` were outside `_lock`; added lock protection.
17+
- **main.js timer leak**`_scanDebounceTimer` missing from `cleanupTimers()`; leaked on panel close.
18+
- **main.js safeFixed**`defaultZoomVal` slider used raw `toFixed()` instead of `safeFixed()` wrapper.
19+
- **FFmpeg stderr truncation UX**`run_ffmpeg()` truncated stderr silently; now prepends `"...[truncated] "` marker when truncating.
20+
- **Test fix**`test_system_gpu` expected `gpu_available` key but API returns `available`.
21+
322
## [1.9.3] - 2026-03-27
423

524
### Added

CLAUDE.md

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

182182
## Version
183-
- Current: **v1.9.3**
183+
- Current: **v1.9.4**
184184
- 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`
185185
- Use `python scripts/sync_version.py --set X.Y.Z` to update all 19 targets at once (including UXP files and package.json)
186186
- Use `python scripts/sync_version.py --check` in CI to verify all targets match
@@ -919,6 +919,23 @@ enhance = ["resemble-enhance>=0.0.1"]
919919
- **10 duplicate class attributes in HTML** — 10 elements had two `class=` attributes; HTML parser silently ignores the second, losing spacing utilities (mt-xs, mt-sm, mb-sm, mt-md). All merged into single attributes.
920920
- **pip install permission denied**`safe_pip_install()` failed on Windows when both normal and `--user` installs hit Errno 13 (Microsoft Store Python, OneDrive-synced user dirs, restrictive ACLs). Added `--target ~/.opencut/packages` as third fallback strategy. server.py adds `~/.opencut/packages` to `sys.path` at startup.
921921

922+
## v1.9.4 Batch 36 Bug Fixes
923+
- **face_enhance/face_swap/upscale `_p(pct, msg)` crash** — 3 `on_progress` closures missing `msg=""` default; TypeError when core modules call with 1 arg. Fixed all 3.
924+
- **engagement attribute crash** — shorts pipeline response used direct attribute access; switched to `getattr()` with defaults for all 5 engagement fields.
925+
- **broll_plan inconsistent response** — empty result returned 2 keys, success returned 4. Frontend expects all 4. Fixed + `plan is None` guard + `getattr()` on window fields.
926+
- **style_arbitrary path traversal**`style_image` not validated via `validate_filepath()`. Added.
927+
- **plugin install path traversal**`source` not validated via `validate_path()`. Added.
928+
- **plugin uninstall symlink escape** — resolved path not verified to stay within `PLUGINS_DIR`. Added `os.path.realpath()` containment check.
929+
- **depth_effects model_id injection**`model_size` interpolated into HuggingFace model ID without allowlist in `apply_bokeh_effect()` and `apply_parallax_zoom()`. Added allowlist in all 3 functions.
930+
- **GPU rate limit gaps** — interpolate + basicvsr denoise bypassed `rate_limit("ai_gpu")`. Added guards.
931+
- **Queue allowlist +9 routes** — interpolate, depth/map/bokeh/parallax, broll-plan, remove/watermark, upscale/run, multicam-xml, search/auto-index.
932+
- **title_overlay preset allowlist** — Missing `lower_third`, `countdown`, `kinetic_bounce`.
933+
- **Engine registry cache race**`_availability_cache` reads/writes outside lock. Fixed.
934+
- **main.js timer leak**`_scanDebounceTimer` missing from `cleanupTimers()`.
935+
- **main.js safeFixed** — zoom slider used raw `toFixed()`.
936+
- **FFmpeg stderr truncation** — now prepends `"...[truncated] "` marker.
937+
- **Test fix**`test_system_gpu` expected wrong key name.
938+
922939
## v1.9.0 Features Added
923940

924941
### Backend Infrastructure

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.3" -ForegroundColor DarkGray
158+
Write-Host " Installer v1.9.4" -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.3"
5+
#define MyAppVersion "1.9.4"
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.2"
5+
ExtensionBundleVersion="1.9.4"
66
ExtensionBundleName="OpenCut">
77

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

1212
<ExecutionEnvironment>

0 commit comments

Comments
 (0)