mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Don't allow evaling JS in Milkdrop preset files (#1308)
* Don't allow evaling JS in Milkdrop preset files * Add link
This commit is contained in:
parent
910995d469
commit
b7d759618e
1 changed files with 5 additions and 0 deletions
|
|
@ -59,6 +59,11 @@ function Visualizer({ analyser, width, height }: Props) {
|
|||
meshWidth: 32,
|
||||
meshHeight: 24,
|
||||
pixelRatio: window.devicePixelRatio || 1,
|
||||
// Webamp may support rendering Milkdrop presets from untrusted sources.
|
||||
// By using `onlyUseWASM` here we instruct Butterchurn not to `eval`
|
||||
// JavaScript code included in older Butterchurn preset `.json` files.
|
||||
// https://jordaneldredge.com/blog/speeding-up-winamps-music-visualizer-with-webassembly/#security
|
||||
onlyUseWASM: true,
|
||||
}
|
||||
);
|
||||
_visualizer.connectAudio(analyser);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue