Skip to content

Commit b7f00d9

Browse files
committed
fix: batch 34 — security + stability fixes in core infrastructure
Security: - validate_path() now blocks UNC/network paths (\server\share, //server/share) — prevents SSRF and NTLM hash leak on Windows. Checked both before and after os.path.normpath(). - ExtendScript startOpenCutBackend: sanitize registry-sourced exePath against batch command injection chars (&|<>^%") Job system stability: - Stuck "running" jobs now auto-expire after 2 hours — prevents permanent TooManyJobsError when job threads crash silently - proc.wait(5) after proc.kill() to reap zombie processes - async_job decorator now stores thread handle in job dict (_thread was always None, preventing stuck thread detection) ExtendScript: - applyEditsToTimeline: projectItem in/out point reset is now guaranteed (needsReset flag tracks whether cleanup needed, reset block runs regardless of exceptions in insert loop)
1 parent 06fb113 commit b7f00d9

20 files changed

Lines changed: 57 additions & 30 deletions

File tree

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

88
<ExtensionList>
9-
<Extension Id="com.opencut.panel.main" Version="1.5.5" />
9+
<Extension Id="com.opencut.panel.main" Version="1.5.6" />
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
@@ -2943,7 +2943,7 @@ <h1 class="content-title" id="contentTitle">Cut & Clean</h1>
29432943
<div class="card-header"><div class="card-title">About OpenCut</div></div>
29442944
<div class="settings-row">
29452945
<span class="settings-label">Version</span>
2946-
<span class="settings-value">1.5.5</span>
2946+
<span class="settings-value">1.5.6</span>
29472947
</div>
29482948
<div class="about-links">
29492949
<a href="https://github.com/SysAdminDoc/opencut" class="about-link" target="_blank">GitHub</a>

extension/com.opencut.panel/client/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ============================================================
2-
OpenCut CEP Panel - Main Controller v1.5.5
2+
OpenCut CEP Panel - Main Controller v1.5.6
33
6-Tab Professional Toolkit
44
============================================================ */
55
(function () {

extension/com.opencut.panel/client/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ============================================================
2-
OpenCut CEP Panel v1.5.5 - ULTRA PREMIUM EDITION
2+
OpenCut CEP Panel v1.5.6 - ULTRA PREMIUM EDITION
33
Next-Generation AI Editing Suite for Adobe Premiere Pro
44
============================================================ */
55

extension/com.opencut.panel/host/index.jsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,11 @@ function applyEditsToTimeline(segmentsJson, mediaPath) {
595595

596596
// Set the project item's in/out points to this segment
597597
// This controls what portion of the clip gets inserted
598+
var needsReset = false;
598599
try {
599600
projectItem.setInPoint(segStart, 4); // 4 = all media types
600601
projectItem.setOutPoint(segEnd, 4);
602+
needsReset = true;
601603
} catch (e) {
602604
// If setInPoint/setOutPoint not available, skip this segment
603605
continue;
@@ -624,19 +626,15 @@ function applyEditsToTimeline(segmentsJson, mediaPath) {
624626
}
625627
}
626628

627-
// Reset the project item's in/out points so it appears normal in the project panel
629+
// Always reset the project item's in/out points (even if loop threw)
628630
try {
629631
projectItem.clearInPoint(4);
630632
projectItem.clearOutPoint(4);
631633
} catch (e) {
632-
// clearInPoint may not exist in all versions; try setting to extremes
633634
try {
634635
projectItem.setInPoint(0, 4);
635-
// setOutPoint to a very large value to effectively clear it
636-
projectItem.setOutPoint(86400, 4); // 24 hours
637-
} catch (e2) {
638-
// Best effort -- don't fail the whole operation
639-
}
636+
projectItem.setOutPoint(86400, 4);
637+
} catch (e2) {}
640638
}
641639

642640
if (insertedCount === 0) {
@@ -1137,8 +1135,9 @@ function startOpenCutBackend() {
11371135
bat.writeln("timeout /t 1 /nobreak >nul 2>&1");
11381136

11391137
if (exePath) {
1140-
// Launch the installed exe
1141-
bat.writeln('"' + exePath + '"');
1138+
// Launch the installed exe (sanitize path against injection)
1139+
var safePath = exePath.replace(/[&|<>^%"]/g, "");
1140+
bat.writeln('"' + safePath + '"');
11421141
} else {
11431142
// Fall back to python -m (dev mode)
11441143
var pythonCmds = ["python", "python3", "py"];

extension/com.opencut.uxp/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<path d="M4 2.5a3 3 0 00-1.76 5.43L7.33 11l-5.09 3.07A3 3 0 104.8 19.5a3 3 0 001.76-5.43L8.93 12.6 16.5 17V5L8.93 9.4 6.56 7.93A3 3 0 004 2.5z" fill="var(--accent)"/>
1717
</svg>
1818
<span class="oc-logo">OpenCut</span>
19-
<span class="oc-version">v1.5.5</span>
19+
<span class="oc-version">v1.5.6</span>
2020
</div>
2121
<div class="oc-header-right">
2222
<div class="oc-connection" id="connectionStatus" title="Backend connection status">

extension/com.opencut.uxp/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const BACKEND_DEFAULT = "http://127.0.0.1:5679";
2323
const BACKEND_MAX_PORT = 5689;
2424
const POLL_INTERVAL_MS = 1200;
2525
const HEALTH_CHECK_MS = 8000;
26-
const VERSION = "1.5.5";
26+
const VERSION = "1.5.6";
2727

2828
async function detectBackend() {
2929
// Try ports 5679-5689 like CEP panel does

extension/com.opencut.uxp/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "com.opencut.uxp",
33
"name": "OpenCut UXP",
4-
"version": "1.5.5",
4+
"version": "1.5.6",
55
"main": "index.html",
66
"host": [
77
{

0 commit comments

Comments
 (0)