Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rewriting-stream): Don't escape text in special tags #434

Merged
merged 1 commit into from Mar 6, 2022

Conversation

fb55
Copy link
Collaborator

@fb55 fb55 commented Mar 4, 2022

Fixes #339

Question: This allows users to leak data from tags. Eg. inserting the text </script> foo would close the current script tag. There is no good solution that works for all special tags, and I'm not even sure this is an issue.

cc @nfriedly — I'd love to hear your take on this.

@nfriedly
Copy link

nfriedly commented Mar 4, 2022

Looks good to me. Thank you!

@fb55
Copy link
Collaborator Author

fb55 commented Mar 5, 2022

cc @alan-agius4 @clydin as the last contributors to Angular's rewriting stream code:

The Angular team uses the rewriting stream; as probably the main consumer of this: Is the possibility of text escaping its container (see question above) a concern for you?

@alan-agius4
Copy link
Contributor

@fb55, I don’t think this is a problem at all.

@fb55 fb55 merged commit a574966 into master Mar 6, 2022
@fb55 fb55 deleted the fix/rewriter-text branch March 6, 2022 12:42
@fb55
Copy link
Collaborator Author

fb55 commented Mar 6, 2022

I don’t think this is a problem at all.

Awesome, thanks for confirming.

jmbpwtw pushed a commit to jmbpwtw/parse5 that referenced this pull request Feb 16, 2023
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.

RewritingStream incorrectly escaping contents of <script> tags via emitText()
3 participants