Matt Bierner cbf9ae23ed Allow loading webview outside of file: origin (#41698)
* Allow loading webview outside of file: origin

**Problem**
Webviews are currently always loaded from a file on the disk. This results in the webview running in the file origin, potentially allowing it to access any file on disk. If a webview fails to sanitize workspace or remote input, untrusted code could potentially access files on the user's system.

**Fix**
Add a new option to serve the webview out of a "data:" uri instead. This prevents access to `file://` resources.

In order to allow webviews to still load resources from disk, add a new protocol called `vscode-core-resource://` that only allows access to resources inside of the vscode directory.

Moves extension pages and our release notes to use this new option. These already are pretty locked down. We cannot move the htmlpreview command to use this option as it would break a huge number of existing extensions, however the new webview API will always have this new option enabled.

* Shorted protocol name
2018-01-16 12:50:14 -08:00
2018-01-12 17:42:43 +01:00
2018-01-08 10:55:28 +01:00
2018-01-16 18:04:46 +01:00
2018-01-12 07:27:30 +01:00
2018-01-14 18:35:26 +01:00
2018-01-11 10:44:05 +01:00
2018-01-08 10:55:28 +01:00
2018-01-08 09:57:10 -08:00
2018-01-14 12:57:34 -08:00
2018-01-08 09:57:10 -08:00

Visual Studio Code - Open Source

Build Status Build Status Coverage Status Gitter

VS Code is a new type of tool that combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. Code provides comprehensive editing and debugging support, an extensibility model, and lightweight integration with existing tools.

VS Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on VS Code's website. To get the latest releases every day, you can install the Insiders version of VS Code. This builds from the master branch and is updated at least daily.

VS Code in action

The vscode repository is where we do development and there are many ways you can participate in the project, for example:

Contributing

If you are interested in fixing issues and contributing directly to the code base, please see the document How to Contribute, which covers the following:

Please see also our Code of Conduct.

Feedback

Many of the core components and extensions to Code live in their own repositories on GitHub. For example, the node debug adapter and the mono debug adapter.

For a complete list, please see the Related Projects page on our wiki.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

S
Languages
TypeScript 75.8%
jsonc 19.8%
CSS 1.2%
JavaScript 0.8%
C 0.7%
Other 1.4%