diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-04-15 10:36:20 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-16 19:19:31 +0200 |
commit | 2381b197198344544964aa19368cde2d35a35e14 (patch) | |
tree | 9aa2394c0f95113946487c72265aebe11be84b31 /Userland/Applications/Browser/CookieJar.h | |
parent | 6e10c2cdb706f0f6a1a4cd600fadfa809026f622 (diff) | |
download | serenity-2381b197198344544964aa19368cde2d35a35e14.zip |
Browser+LibWeb+WebContent: Parse cookies in the OOP tab
To protect the main Browser process against nefarious cookies, parse the
cookies out-of-process and then send the parsed result over IPC to the
main process. This way, if the cookie parser blows up, only that tab
will be affected.
Diffstat (limited to 'Userland/Applications/Browser/CookieJar.h')
-rw-r--r-- | Userland/Applications/Browser/CookieJar.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Browser/CookieJar.h b/Userland/Applications/Browser/CookieJar.h index b3f69da1ca..c1ac54942e 100644 --- a/Userland/Applications/Browser/CookieJar.h +++ b/Userland/Applications/Browser/CookieJar.h @@ -47,7 +47,7 @@ struct CookieStorageKey { class CookieJar { public: String get_cookie(const URL& url, Web::Cookie::Source source); - void set_cookie(const URL& url, const String& cookie, Web::Cookie::Source source); + void set_cookie(const URL& url, const Web::Cookie::ParsedCookie& parsed_cookie, Web::Cookie::Source source); void dump_cookies() const; private: @@ -56,7 +56,7 @@ private: static bool path_matches(const String& request_path, const String& cookie_path); static String default_path(const URL& url); - void store_cookie(Web::Cookie::ParsedCookie& parsed_cookie, const URL& url, String canonicalized_domain, Web::Cookie::Source source); + void store_cookie(const Web::Cookie::ParsedCookie& parsed_cookie, const URL& url, String canonicalized_domain, Web::Cookie::Source source); Vector<Web::Cookie::Cookie*> get_matching_cookies(const URL& url, const String& canonicalized_domain, Web::Cookie::Source source); void purge_expired_cookies(); |