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

Detect trusted HTMLs more safely #102

Merged
merged 2 commits into from
Jun 19, 2023
Merged

Detect trusted HTMLs more safely #102

merged 2 commits into from
Jun 19, 2023

Conversation

weizman
Copy link
Member

@weizman weizman commented Jun 19, 2023

Attempt to fix issue #95.

The idea is to find a safer way to tell trusted HTMLs from nodes.

The safest way I could think of is to just overwrite the behaviour of createHTML so that when a trusted HTML is created, we store it aside.

Then, when trying to figure out if a provided object is not a node but a trusted HTML, we can simply look it up in the stash of trusted HTMLs we keep - that way we don't rely on any properties of the trusted HTML object itself, which makes this safe.

Unless there's a way to clone a trusted HTML instance.........?

@weizman weizman changed the title poc detect trusted htmls safely Detect trusted HTMLs more safely Jun 19, 2023
@weizman weizman marked this pull request as ready for review June 19, 2023 09:08
@weizman weizman merged commit 1a0f395 into main Jun 19, 2023
2 checks passed
@weizman weizman deleted the fix-issue-95 branch June 19, 2023 09:09
@weizman weizman mentioned this pull request Jul 17, 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.

None yet

1 participant