Files
vscode/extensions
6a99cd4fe5 fix: validate file stat size/mtime before SQLite bind in external ingest index (fixes #321794) (#321799)
* fix: reject non-numeric file stats before SQLite bind in external ingest index

Virtual/custom file system providers can return a FileStat whose `size` or
`mtime` is not a number, violating the declared `number` type of safeStat().
These values were passed straight into a node:sqlite parameter bind, which
rejects any non-number value and throws the unhandled error "Provided value
cannot be bound to SQLite parameter 2".

Validate the numeric contract at the file-system boundary in safeStat() and
treat a stat with a non-numeric size or mtime as unusable (return undefined),
matching the function's existing behaviour for directories and stat failures.

Fixes #321794

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: reject non-finite external ingest file stats

Use finite-number validation at the filesystem boundary so NaN and infinity cannot reach SQLite. Cover malformed provider metadata while ensuring later valid files are still indexed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
2026-08-24 23:57:44 +00:00
..
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-07-14 12:34:04 +02:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00
2026-08-11 09:10:49 +00:00