mirror of
https://github.com/giancarloerra/socraticode.git
synced 2026-07-03 14:05:21 +02:00
c2d012fe4c
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.