mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
LibWeb: Propagate exceptions from setAttribute() in DOMStringMap setter
We were incorrectly assuming that setAttribute() could never fail here, even when passed an invalid name. Found by Domato.
This commit is contained in:
committed by
Andreas Kling
parent
1c00e5688d
commit
093f1dd805
Notes:
github-actions[bot]
2024-07-20 07:32:01 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/093f1dd805f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/721
@@ -0,0 +1,12 @@
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let threw = false;
|
||||
try {
|
||||
document.body.dataset["'\uDBF8"] = "foo";
|
||||
} catch {
|
||||
threw = true;
|
||||
}
|
||||
println("Setting DOMStringMap with an invalid name key throws? " + threw);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user