fix(core): reject script element as a dynamic component host#68711
Closed
alan-agius4 wants to merge 1 commit into
Closed
fix(core): reject script element as a dynamic component host#68711alan-agius4 wants to merge 1 commit into
alan-agius4 wants to merge 1 commit into
Conversation
Contributor
|
So I think the solution to this other problem lies there? I think it's worth looking into. |
Contributor
Author
|
Yes, this change would also address what is mentioned in https://issuetracker.google.com/u/1/issues/510537066 |
1f24df7 to
6e865df
Compare
To enhance application security and prevent accidental or malicious script execution, this change ensures that dynamically mounting a component via createComponent directly onto a <script> element throws a runtime error in development mode. SVG <script> elements are also rejected. The error message is designed to be fully tree-shakable under production builds where ngDevMode is disabled.
6e865df to
3cd005e
Compare
Contributor
|
Then the issue mentioned could be reclassified because, as I understand it, this can be a common pattern in applications |
Contributor
Author
|
Closing the PR as I am unable to update review requests will open a new one. |
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.
To enhance application security and prevent accidental or malicious script execution, this change ensures that dynamically mounting a component via createComponent directly onto a <script> element throws a runtime error in development mode. SVG <script> elements are also rejected. The error message is designed to be fully tree-shakable under production builds where ngDevMode is disabled.
More context in: #68689 (comment)