mirror of
https://github.com/TanStack/devtools.git
synced 2026-11-16 10:49:48 +00:00
fix(devtools-bundler-core): validate package and import names from the event bus (#545)
The install-devtools and bump-package-version events come from the unauthenticated event bus. installPackage put the package name into a shell string for exec(), so "x; touch /tmp/pwned; #" ran the second command. installPackage now accepts only an npm package name with an optional version and no leading "-". On macOS and Linux it runs the package manager with execFile and no shell. Windows still needs a shell for the .cmd shims, and the pattern allows no cmd.exe syntax. The plugin import name from the same events is written into the user's devtools file as code, so it must now be a JavaScript identifier. Refs #464
This commit is contained in:
parent
7b5f1eef8b
commit
d018c4c99f
5 changed files with 116 additions and 11 deletions
Loading…
Add table
Add a link
Reference in a new issue