Repository navigation
Conversation
Setting the `config` property on <playground-ide> or <playground-project> used to fetch any file listed without `content`, follow `extends`, and adopt `cdnBaseUrl` from the config. The `config` property is the documented way to load a shared project, so a config from an untrusted source (e.g. decoded from a URL) could make the host page fetch arbitrary URLs with the user's credentials. The responses became project files, which code running in the preview could then read. The `config` property now only uses files with inline string `content` and the `importMap`. Files without `content`, `extends`, and `cdnBaseUrl` are ignored with a console warning, and malformed file entries are skipped instead of throwing. Manifests loaded with `project-src` are unchanged. BREAKING CHANGE: configs set through the `config` property that rely on fetched files, `extends`, or `cdnBaseUrl` must be loaded with `project-src` instead, with the CDN set through the `cdnBaseUrl` property or `cdn-base-url` attribute.
augustjk
force-pushed
the
restrict-untrusted-config
branch
from
November 19, 2026 17:27
361e884 to
ce7f4eb
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting the
configproperty on or used to fetch any file listed withoutcontent, followextends, and adoptcdnBaseUrlfrom the config. Theconfigproperty is the documented way to load a shared project, so a config from an untrusted source (e.g. decoded from a URL) could make the host page fetch arbitrary URLs with the user's credentials. The responses became project files, which code running in the preview could then read.The
configproperty now only uses files with inline stringcontentand theimportMap. Files withoutcontent,extends, andcdnBaseUrlare ignored with a console warning, and malformed file entries are skipped instead of throwing. Manifests loaded withproject-srcare unchanged.BREAKING CHANGE: configs set through the
configproperty that rely on fetched files,extends, orcdnBaseUrlmust be loaded withproject-srcinstead, with the CDN set through thecdnBaseUrlproperty orcdn-base-urlattribute.