You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Align /api/validate-path with validate_workspace_path (PR #22)
- POST /api/validate-path now uses the same realpath + marker checks as
set-workspace; returns canonical path and structured errors on failure.
- README documents WORKSPACE_PATH as trusted-operator tilde expansion only.
- Config page shows server error text when validation fails.
- Docstrings + symlink-test CI note; TOCTOU comment after realpath.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,8 @@ The application automatically detects your Cursor workspace storage location:
122
122
123
123
To override, set the `WORKSPACE_PATH` environment variable or use the Configuration page in the web UI.
124
124
125
+
Paths submitted through **`POST /api/set-workspace`** (and **`POST /api/validate-path`**) are validated the same way: canonical resolution (`realpath`), directory checks, and Cursor workspace markers (`state.vscdb` under immediate subdirectories). The **`WORKSPACE_PATH`** environment variable is only tilde-expanded — it is a **trusted-operator** escape hatch for automation and known-good paths, not a substitute for those API checks when untrusted input matters.
126
+
125
127
Cursor CLI agent sessions are read from `~/.cursor/chats/` (the default path used by the `cursor agent` CLI). Override with the `CLI_CHATS_PATH` environment variable.
0 commit comments