mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
LibWeb/XHR: Use normalized header value when validating contents
This was not matching specification and caused valid requests to be rejected.
This commit is contained in:
parent
4e48298414
commit
84f673515b
Notes:
github-actions[bot]
2024-11-21 00:59:06 +00:00
Author: https://github.com/rmg-x Commit: https://github.com/LadybirdBrowser/ladybird/commit/84f673515bd Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2434 Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 1 additions and 1 deletions
|
@ -433,7 +433,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::set_request_header(String const& name_
|
|||
// 4. If name is not a header name or value is not a header value, then throw a "SyntaxError" DOMException.
|
||||
if (!Fetch::Infrastructure::is_header_name(name))
|
||||
return WebIDL::SyntaxError::create(realm, "Header name contains invalid characters."_string);
|
||||
if (!Fetch::Infrastructure::is_header_value(value))
|
||||
if (!Fetch::Infrastructure::is_header_value(normalized_value))
|
||||
return WebIDL::SyntaxError::create(realm, "Header value contains invalid characters."_string);
|
||||
|
||||
auto header = Fetch::Infrastructure::Header {
|
||||
|
|
Loading…
Reference in a new issue