feat: add httpOnly cookies.get filter (#37255)

feat: add httpOnly cookies filter
This commit is contained in:
Black-Hole 2023-02-21 18:44:35 +08:00 committed by GitHub
parent 85cf56d80b
commit 868676aa5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 0 deletions

View file

@ -133,6 +133,9 @@ bool MatchesCookie(const base::Value::Dict& filter,
absl::optional<bool> session_filter = filter.FindBool("session");
if (session_filter && *session_filter == cookie.IsPersistent())
return false;
absl::optional<bool> httpOnly_filter = filter.FindBool("httpOnly");
if (httpOnly_filter && *httpOnly_filter != cookie.IsHttpOnly())
return false;
return true;
}