mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Avoid accessing opaque origin port during CSP checks
This commit is contained in:
parent
cd0cadc5e1
commit
941da11ece
Notes:
github-actions[bot]
2025-07-13 12:34:40 +00:00
Author: https://github.com/tcl3
Commit: 941da11ece
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5422
Reviewed-by: https://github.com/gmta ✅
5 changed files with 111 additions and 1 deletions
|
@ -541,7 +541,7 @@ MatchResult does_url_match_expression_in_origin_with_redirect_count(URL::URL con
|
|||
origin_port = origin.port();
|
||||
}
|
||||
|
||||
if (origin_host == url.host() && (origin.port() == url.port() || (origin_port == origin_default_port && url.port() == url_default_port))) {
|
||||
if (origin_host == url.host() && (origin_port == url.port() || (origin_port == origin_default_port && url.port() == url_default_port))) {
|
||||
// 1. url’s scheme is "https" or "wss"
|
||||
if (url.scheme() == "https"sv || url.scheme() == "wss"sv)
|
||||
return MatchResult::Matches;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue