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 expressionCache bug #6

Merged
merged 2 commits into from
Sep 17, 2022
Merged

Fix expressionCache bug #6

merged 2 commits into from
Sep 17, 2022

Conversation

mdynnl
Copy link
Contributor

@mdynnl mdynnl commented Sep 13, 2022

expressionCache is a plain object which will give a property from object prototype if expression is one of them e.g toString, constructor causing all sorts of unexpected behavior such as one seen in solidjs/solid-docs#175

example code that can fail

jsx('x', { children: 'constructor' })
jsx('x', { children: '__proto__' })

on a related note, this type of bug also affects solid-js

`expressionCache` is a plain object which will give a property from object prototype if `expression` is one of them e.g `toString`, `constructor` causing all sorts of unexpected behavior such as one seen in solidjs/solid-docs#175

example code that can fail
```
jsx('x', { children: 'constructor' })
jsx('x', { children: '__proto__' })
```
src/jsx-runtime.ts Outdated Show resolved Hide resolved
@high1 high1 merged commit 744eac9 into high1:main Sep 17, 2022
@mdynnl mdynnl deleted the patch-1 branch September 17, 2022 19:32
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.

2 participants