summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-04-13 17:30:41 -0400
committerAndreas Kling <kling@serenityos.org>2021-04-14 16:07:46 +0200
commitc00760c5f9ca72b89b39feb7042978da2f15eef3 (patch)
treefcec9f5b592b3472593c4f136c90e2f5595eac67 /Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
parent7193e518d1190e54ba3a94cc42c4905a7be786a1 (diff)
downloadserenity-c00760c5f9ca72b89b39feb7042978da2f15eef3.zip
Browser+LibWeb+WebContent: Track the source of document.cookie requests
To implement the HttpOnly attribute, the CookieJar needs to know where a request originated from. Namely, it needs to distinguish between HTTP / non-HTTP (i.e. JavaScript) requests. When the HttpOnly attribute is set, requests from JavaScript are to be blocked.
Diffstat (limited to 'Userland/Libraries/LibWeb/OutOfProcessWebView.cpp')
-rw-r--r--Userland/Libraries/LibWeb/OutOfProcessWebView.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
index 017a7f258e..6c069edf69 100644
--- a/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
+++ b/Userland/Libraries/LibWeb/OutOfProcessWebView.cpp
@@ -365,17 +365,17 @@ void OutOfProcessWebView::notify_server_did_change_favicon(const Gfx::Bitmap& fa
on_favicon_change(favicon);
}
-String OutOfProcessWebView::notify_server_did_request_cookie(Badge<WebContentClient>, const URL& url)
+String OutOfProcessWebView::notify_server_did_request_cookie(Badge<WebContentClient>, const URL& url, Cookie::Source source)
{
if (on_get_cookie)
- return on_get_cookie(url);
+ return on_get_cookie(url, source);
return {};
}
-void OutOfProcessWebView::notify_server_did_set_cookie(Badge<WebContentClient>, const URL& url, const String& cookie)
+void OutOfProcessWebView::notify_server_did_set_cookie(Badge<WebContentClient>, const URL& url, const String& cookie, Cookie::Source source)
{
if (on_set_cookie)
- on_set_cookie(url, cookie);
+ on_set_cookie(url, cookie, source);
}
void OutOfProcessWebView::did_scroll()