ladybird/Libraries/LibWeb/WebDriver
sideshowbarker 9f7a328d9b LibWeb: Reject canvas toDataURL()/toBlob() when not origin-clean
Problem: Drawing a cross-origin image onto a 2D canvas clears its
origin-clean flag, but toDataURL() and toBlob() ignored that flag and
serialized the bitmap regardless. So, a page could read back the
cross-origin pixels it shouldn't (per spec) be allowed to access.

Cause: The origin-clean checks in to_data_url() and to_blob() were left
as FIXMEs. Only getImageData() enforced the flag.

Fix: Throw a SecurityError exception from both serialization entry
points when the canvas isn't origin-clean — matching getImageData() and
the spec. The same check also implements the previously-stubbed
origin-clean step in the WebDriver canvas-encoding algorithm.

Fixes: https://github.com/LadybirdBrowser/ladybird/issues/10009
2026-06-18 10:52:42 +02:00
..
Actions.cpp LibWeb: Avoid invalid WebDriver key modifier values 2026-06-14 17:38:44 +02:00
Actions.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Capabilities.cpp LibWebView: Keep browser history in the UI process 2026-06-14 17:38:44 +02:00
Capabilities.h LibWebView: Keep browser history in the UI process 2026-06-14 17:38:44 +02:00
Client.cpp LibWebView: Keep browser history in the UI process 2026-06-14 17:38:44 +02:00
Client.h LibWebView: Keep browser history in the UI process 2026-06-14 17:38:44 +02:00
Contexts.cpp Meta: Enable exit-time destructor warnings for libraries 2026-06-04 19:20:49 +02:00
Contexts.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
ElementLocationStrategies.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ElementLocationStrategies.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
ElementReference.cpp Meta: Enable exit-time destructor warnings for libraries 2026-06-04 19:20:49 +02:00
ElementReference.h LibWeb: Don't crash in WebDriver call when element has no client rects 2026-02-11 09:34:47 +01:00
Error.cpp Meta: Enable exit-time destructor warnings for libraries 2026-06-04 19:20:49 +02:00
Error.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
ExecuteScript.cpp LibGC: Move Web::WebDriver::HeapTimer to GC::Timer 2026-05-10 10:58:11 +02:00
ExecuteScript.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
InputSource.cpp LibWeb+WebContent+WebDriver: Port WebDriver to String 2025-02-20 19:27:51 -05:00
InputSource.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
InputState.cpp Meta: Enable exit-time destructor warnings for libraries 2026-06-04 19:20:49 +02:00
InputState.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
JSON.cpp LibWeb: Remove unused members from SessionHistoryEntry 2026-04-03 14:20:09 +02:00
JSON.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Properties.h LibWeb+WebContent+WebDriver: Port WebDriver to String 2025-02-20 19:27:51 -05:00
Proxy.cpp LibWeb: Fix socksProxy validation error messages 2026-05-23 08:54:43 -04:00
Proxy.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Response.cpp LibWeb+WebContent+WebDriver: Port WebDriver to String 2025-02-20 19:27:51 -05:00
Response.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Screenshot.cpp LibWeb: Reject canvas toDataURL()/toBlob() when not origin-clean 2026-06-18 10:52:42 +02:00
Screenshot.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
TimeoutsConfiguration.cpp LibWeb+WebContent+WebDriver: Port WebDriver to String 2025-02-20 19:27:51 -05:00
TimeoutsConfiguration.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
UserPrompt.cpp LibWebView: Keep browser history in the UI process 2026-06-14 17:38:44 +02:00
UserPrompt.h LibWebView: Keep browser history in the UI process 2026-06-14 17:38:44 +02:00