mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:34:57 +00:00
Ladybird: Decode images out of process
This patch brings a service to handle image decompression. With it comes security enhancement due to the process boundary. Indeed, consequences of a potential attack is reduced as only the decoder will crash without perturbing the WebContent process. It also allows us to display pages containing images that we claim to support but still make us crash, like for not-finished-yet decoders. As an example, we can now load https://jpegxl.info/jxl-art.html without crashing the WebContent process.
This commit is contained in:
parent
8659a6d3a7
commit
5c7e5cc738
10 changed files with 86 additions and 25 deletions
|
@ -30,13 +30,13 @@ class Client final
|
|||
IPC_CLIENT_CONNECTION(Client, "/tmp/session/%sid/portal/image"sv);
|
||||
|
||||
public:
|
||||
Client(NonnullOwnPtr<Core::LocalSocket>);
|
||||
|
||||
Optional<DecodedImage> decode_image(ReadonlyBytes, Optional<DeprecatedString> mime_type = {});
|
||||
|
||||
Function<void()> on_death;
|
||||
|
||||
private:
|
||||
Client(NonnullOwnPtr<Core::LocalSocket>);
|
||||
|
||||
virtual void die() override;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue