Skip to content

Conversation

smeijer
Copy link
Member

@smeijer smeijer commented May 31, 2020

This one is quite awesome!

The query (javascript) is now evaluated in a sandbox! This means, that having window.location.href = "https://evil.corp" will no longer redirect the user to a different (potentially bad) domain.

This change also demotes the importance of the preview pane. It now only holds a presentation of the markup, it's no longer being used to run the queries against. Hence, htmlRoot has been removed from the app context.

Thereby, it's no longer required to render the preview. Which is especially useful when rendering in embed mode (no hiding-workarounds required).


fixes #21
resolves #66
closes #67

@smeijer smeijer added the feature New feature or request label May 31, 2020
@smeijer smeijer self-assigned this May 31, 2020
@smeijer smeijer mentioned this pull request May 31, 2020
@smeijer smeijer changed the title feat: update parser to evaluate query in a sandbox feat: evaluate query in a sandbox May 31, 2020
@smeijer smeijer changed the base branch from master to develop May 31, 2020 12:47
@smeijer smeijer mentioned this pull request May 31, 2020
@smeijer smeijer changed the title feat: evaluate query in a sandbox feat: evaluate javascript query in a sandbox May 31, 2020
@smeijer smeijer merged commit 62325ff into develop May 31, 2020
@smeijer smeijer deleted the feature/sandbox-queries branch May 31, 2020 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

question: why the parse function returns also an id? Sandbox code evaluation / prevent redirections
1 participant