Folo/apps
Sebastion bd91b015ee
fix(desktop/ipc): allowlist URL scheme protocols in openURLScheme (#5056)
The 'integration.openURLScheme' IPC method invokes 'shell.openExternal'
with a renderer-supplied string after only checking that it contains
'://'. Electron's documentation explicitly warns that passing untrusted
URLs to 'shell.openExternal' is unsafe: schemes such as 'file://',
'smb://', 'ms-msdt:', 'search-ms:', 'jar:', 'res:', 'javascript:',
'data:' and 'vbscript:' have well-known abuse chains (local file
disclosure, NTLM credential theft over SMB on Windows, MSDT/Follina-style
RCE, etc.). Because the renderer process can also reach this IPC via any
XSS sink in untrusted RSS feed content, the previous validation was not
sufficient.

Replace the substring check with strict URL parsing plus an allowlist of
protocols that match the integration use-cases documented in the UI
(Obsidian, Bear, Drafts, Things, Notion, DEVONthink) plus generic
http/https/mailto. All other protocols are rejected with a clear error.

Adds vitest cases for representative dangerous schemes (verifying that
'shell.openExternal' is never invoked) and for every scheme shipped as a
built-in example, so future regressions on either side are caught.
2026-07-28 13:40:13 +08:00
..
cli chore(deps): update frontend dependencies (#5038) 2026-07-10 22:36:12 +08:00
desktop fix(desktop/ipc): allowlist URL scheme protocols in openURLScheme (#5056) 2026-07-28 13:40:13 +08:00
landing chore(deps): update frontend dependencies (#5038) 2026-07-10 22:36:12 +08:00
mobile fix(mobile): handle RSSHub subscription limit errors 2026-07-26 07:29:14 +08:00
ota chore(deps): update frontend dependencies (#5038) 2026-07-10 22:36:12 +08:00
ssr fix(ssr): restore shared user profiles 2026-07-25 15:06:20 +08:00