Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(browser-extension): accept Windows network-share paths in upload validation

Dash48833348a4bc
diff --git a/apps/desktop/src/main/browser-extension/policy.ts b/apps/desktop/src/main/browser-extension/policy.ts
index d196ef2b94..8aad55a1a8 100644
--- a/apps/desktop/src/main/browser-extension/policy.ts
+++ b/apps/desktop/src/main/browser-extension/policy.ts
@@ -229,7 +229,7 @@ function validateParityPayload(action: string, payload: BrowserExtensionJobPaylo
(!Array.isArray(paths) ||
!paths.length ||
paths.length > 20 ||
- paths.some((p) => !str(p, 4096) || !p || !(/^\//.test(p as string) || /^[A-Za-z]:[\\/]/.test(p as string))) ||
+ paths.some((p) => !str(p, 4096) || !p || !(/^\//.test(p as string) || /^[A-Za-z]:[\\/]/.test(p as string) || /^\\\\[^\\/]/.test(p as string))) ||
(files != null && files.length !== paths.length))
)
throw new Error('upload paths must be 1–20 absolute file paths, one per file.');