Need to validate TypeScript types returned from VS Code before passing them to native process #11375
Labels
bug
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
Milestone
The repro I'm aware of involves invalid entries in
files.associations
. i.e.If specified in a settings file, VS Code is giving us the same content, despite that it doesn't match what VS Code itself expects. Sending this in our LSP initialization message causes it to fail. The native JSON deserializer expects
files.associations
entries to be strings. The mismatch causes the deserializer to reject the request, preventing the initialization message from being processed. Lack of proper initialization causes subsequent messages to fail, triggering crashes due to unexpected state such as lack of any entry in the list of workspace folders (at least 1 is always expected, even in single file mode).Any values that we received from VS Code (at least from user-editable settings) that we include in LSP JSONs messages to the native process, should first go through some sort of type validation.
The text was updated successfully, but these errors were encountered: