Files
socraticode/extension/src
Giancarlo Erra c2d012fe4c fix(extension): tighten graphPanel path and line-number bounds
Two follow-up review fixes on the interactive-graph webview surface:

- `loadGraphHtml(projectId)` now resolves the projectId-derived path
  and verifies the result stays inside `GRAPH_DIR`. The
  `socraticode.openInteractiveGraph` command accepts an arbitrary
  argument from any caller (palette, sidebar, other extensions), so a
  value like `../../etc/passwd` would otherwise escape the cache
  directory via `path.join`. Suspicious projectIds are now rejected
  with a log entry and the function returns `undefined`.
- `handleWebviewMessage` now opens the document first, then clamps
  the requested line number against the document's actual `lineCount`
  before constructing a `Range`. The previous `m.line > 0` check
  prevented negatives but allowed absurdly large values (e.g.
  `Number.MAX_SAFE_INTEGER`) that would build a Range past the end of
  the file. Selection is set on the resolved editor.

Lint, typecheck, manifest tests and build all clean.
2026-05-04 00:52:32 +01:00
..