Diogo Soares Rodrigues and can1357
7a944f1baa
fix(cursor): confine MCP resource downloads to the workspace
...
`download_path` is workspace-relative by contract, but it arrives from
the server and `resolveToCwd` deliberately honors absolute paths, `~`,
and `..` - correct for a path a user typed, a write-anywhere primitive
for one a remote peer supplied. `/etc/cron.d/x` or `../../escape` would
have been written wherever the process can reach.
`confineToWorkspace` accepts only a non-empty relative path resolving
under the live cwd, and the download refuses anything else. The refusal
throws inside the dispatch's existing try, so it reaches the model as a
`ReadMcpResourceError` rather than a silent success or a crash.
(cherry picked from commit 963cfee21a56576033ec115db745bb18ab0a8d06)
2026-07-30 01:42:29 +02:00
..
2026-07-28 06:40:31 +02:00
2026-07-25 21:00:35 +00:00
2026-07-24 16:49:31 +02:00
2026-07-29 23:08:21 +02:00
2026-06-21 04:14:26 +02:00
2026-07-29 23:08:38 +02:00
2026-07-23 17:30:32 +02:00
2026-07-28 10:59:33 +02:00
2026-07-28 07:41:59 +00:00
2026-07-02 08:30:33 +02:00
2026-07-24 22:42:38 +00:00
2026-07-24 03:44:12 +00:00
2026-04-24 22:36:44 +02:00
2026-05-16 07:02:24 +05:30
2026-07-23 22:15:23 +02:00
2026-07-28 02:05:55 +02:00
2026-07-28 06:40:31 +02:00
2026-07-24 01:40:04 +00:00
2026-07-28 17:57:02 -04:00
2026-07-24 01:40:04 +00:00
2026-07-27 01:21:27 +00:00
2026-07-11 18:23:57 +02:00
2026-07-24 01:40:04 +00:00
2026-07-22 15:18:27 +00:00
2026-07-24 08:19:13 +02:00
2026-07-24 01:40:04 +00:00
2026-06-22 06:13:01 +02:00
2026-07-24 16:49:31 +02:00
2026-07-22 15:18:27 +00:00
2026-07-22 15:18:27 +00:00
2026-04-29 01:16:33 +02:00
2026-05-09 05:50:09 +02:00
2026-07-26 11:36:19 +00:00
2026-04-23 21:02:14 +02:00
2026-07-28 07:41:59 +00:00
2026-07-18 21:03:24 +02:00
2026-06-15 15:43:48 +00:00
2026-07-26 21:33:13 +00:00
2026-07-30 01:42:06 +02:00
2026-06-10 23:13:39 +02:00
2026-07-23 20:44:50 +02:00
2026-07-23 20:44:50 +02:00
2026-07-28 21:18:43 -04:00
2026-07-04 15:47:52 +00:00
2026-07-27 04:59:19 +02:00
2026-06-19 04:58:29 +02:00
2026-05-25 17:21:53 +00:00
2026-02-22 01:35:32 +01:00
2026-02-22 01:58:04 +01:00
2026-06-18 00:59:53 +02:00
2026-01-24 00:03:52 +01:00
2026-07-14 20:01:45 +00:00
2026-05-28 01:00:23 +02:00
2026-07-09 18:27:23 +02:00
2026-06-18 00:59:55 +02:00
2026-06-18 00:59:55 +02:00
2026-07-24 15:52:01 +00:00
2026-06-18 00:59:55 +02:00
2026-07-28 02:05:55 +02:00
2026-07-02 01:51:09 +02:00
2026-07-30 01:42:29 +02:00
2026-06-26 16:39:48 +02:00
2026-07-28 03:34:36 +02:00
2026-07-24 22:42:38 +00:00
2026-07-24 01:40:04 +00:00
2026-07-23 13:24:45 +02:00
2026-07-24 12:03:49 +02:00
2026-07-15 15:16:29 +02:00
2026-07-26 11:36:19 +00:00
2026-06-20 07:55:09 +00:00
2026-07-13 19:21:45 +02:00
2026-07-26 09:29:13 -03:00
2026-07-06 08:07:24 +02:00
2026-06-12 16:26:38 +02:00
2026-07-22 15:18:27 +00:00
2026-07-09 08:03:39 +02:00
2026-07-14 17:58:14 +00:00
2026-07-29 23:08:38 +02:00
2026-07-29 23:09:01 +02:00
2026-07-20 22:57:11 +02:00