Skip to content

Conversation

@manuelpuyol
Copy link
Contributor

We should never allow building script tags in our applications since they side-step some security measures.

@manuelpuyol manuelpuyol requested a review from a team as a code owner March 24, 2022 17:08
@manuelpuyol manuelpuyol requested a review from theinterned March 24, 2022 17:08
Copy link
Contributor

@theinterned theinterned left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ Thank you for addressing my feedback!

]
},
{
code: 'document.createElement("span").type = "text/javascript"',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a script right? Spans don't have a type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wanted to test that .type = "text/javascript" will fail. If I add document.createElement("script"), it will fail without checking the type

@manuelpuyol manuelpuyol merged commit 36a1dd0 into main Mar 25, 2022
@manuelpuyol manuelpuyol deleted the no-script-tag-building branch March 25, 2022 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants