mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
LibWeb: Reject CSS values with unprocessed tokens / extra semicolons
This commit is contained in:
parent
b99f4872d1
commit
832bb978f5
Notes:
github-actions[bot]
2025-05-02 10:11:03 +00:00
Author: https://github.com/bplaat
Commit: 832bb978f5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4543
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/gmta
2 changed files with 4 additions and 5 deletions
|
@ -370,7 +370,7 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue const>> Parser::parse_css_value
|
|||
|
||||
if (token.is(Token::Type::Semicolon)) {
|
||||
unprocessed_tokens.reconsume_current_input_token();
|
||||
break;
|
||||
return ParseError::SyntaxError;
|
||||
}
|
||||
|
||||
if (property_id != PropertyID::Custom) {
|
||||
|
|
|
@ -2,8 +2,7 @@ Harness status: OK
|
|||
|
||||
Found 126 tests
|
||||
|
||||
124 Pass
|
||||
2 Fail
|
||||
126 Pass
|
||||
Pass new DOMMatrix()
|
||||
Pass new DOMMatrix(undefined)
|
||||
Pass new DOMMatrix(new DOMMatrix())
|
||||
|
@ -53,7 +52,7 @@ Pass new DOMMatrix(" ")
|
|||
Pass new DOMMatrix("/**/")
|
||||
Pass new DOMMatrix("\0")
|
||||
Pass new DOMMatrix(";")
|
||||
Fail new DOMMatrix("none;")
|
||||
Pass new DOMMatrix("none;")
|
||||
Pass new DOMMatrix("null")
|
||||
Pass new DOMMatrix(null)
|
||||
Pass new DOMMatrix("undefined")
|
||||
|
@ -116,7 +115,7 @@ Pass new DOMMatrixReadOnly(" ")
|
|||
Pass new DOMMatrixReadOnly("/**/")
|
||||
Pass new DOMMatrixReadOnly("\0")
|
||||
Pass new DOMMatrixReadOnly(";")
|
||||
Fail new DOMMatrixReadOnly("none;")
|
||||
Pass new DOMMatrixReadOnly("none;")
|
||||
Pass new DOMMatrixReadOnly("null")
|
||||
Pass new DOMMatrixReadOnly(null)
|
||||
Pass new DOMMatrixReadOnly("undefined")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue