Closed atjn closed 1 year ago
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 libvips
API.
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: https://github.com/kleisauke/wasm-vips/pull/21#issuecomment-1221549162