mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +00:00
LibWeb: Limit HTMLImageElement
width and height to allowed values
Setting the `width` or `height` properties of `HTMLImageElement` to a value greater than 2147483647 will now cause the property to be set to 0.
This commit is contained in:
parent
c94b4316e7
commit
b05bc71002
Notes:
github-actions[bot]
2024-12-01 15:13:03 +00:00
Author: https://github.com/tcl3
Commit: b05bc71002
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2641
4 changed files with 58 additions and 12 deletions
|
@ -42,7 +42,9 @@
|
|||
return input;
|
||||
}
|
||||
|
||||
testProperty("img", "height", (img) => img.height, (img, value) => img.height = value);
|
||||
testProperty("img", "hspace", (img) => img.hspace, (img, value) => img.hspace = value);
|
||||
testProperty("img", "width", (img) => img.width, (img, value) => img.width = value);
|
||||
testProperty("input", "size", (input) => input.size, (input, value) => input.size = value);
|
||||
testProperty(imageButtonInputFactory, "height", (input) => input.height, (input, value) => input.height = value);
|
||||
testProperty(imageButtonInputFactory, "width", (input) => input.width, (input, value) => input.width = value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue