-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Support blocking untrusted operations #24
Conversation
I considered integrating this a bit deeper, allowing for things like: vips.Operation.block(vips.Image.pngsave, true);
vips.Image.jpegsave.block(true);
vips.Image.jpegsave.block(); // returns true
vips.Image.jpegsave.untrusted(); // returns false But AFAICT it would require a massive amount of work, and I wasn't even sure if it would be desirable, given that it is pretty different from the core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I left a couple of comments inline.
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
To match build/preamble
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
- Ensure `test_block.js` suite is also being tested on the browser. - Move `before` and `after{,Each}` hooks inside the `describe` block. - Simplify `blockUntrusted` test. - Escape boolean types between grave accents in `vips.d.ts`.
We could return an operation from cache even after the operatuion had been blocked. This was harmless, but could cause confusion. see kleisauke/wasm-vips#24
Non-functional change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks all! This will be in v0.0.4.
We could return an operation from cache even after the operatuion had been blocked. This was harmless, but could cause confusion. see kleisauke/wasm-vips#24
Support blocking untrusted and arbitrary operations with
vips_block_untrusted_set
andvips_operation_block_set
:Note that it was already possible to use
vips_block_untrusted_set
before, by setting themodule.ENV.VIPS_BLOCK_UNTRUSTED
parameter on initialization.Related: #21 (comment)