Skip to content

Detect trusted HTMLs more safely#102

Merged
weizman merged 2 commits intomainfrom
fix-issue-95
Jun 19, 2023
Merged

Detect trusted HTMLs more safely#102
weizman merged 2 commits intomainfrom
fix-issue-95

Conversation

@weizman
Copy link
Copy Markdown
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
@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.

1 participant