From b59773de178b336cf76a77fbb46bcbec9f016e74 Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Thu, 3 Mar 2022 13:27:36 +0000 Subject: [PATCH] LibWeb: Include cookies in form submission Services expect cookies to be submitted with forms, especially login screens. Allows us to sign in to GitHub (including two factor authentication) and start using it! --- Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp index e934642fe96..5175fcd158c 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp @@ -116,8 +116,7 @@ void HTMLFormElement::submit_form(RefPtr submitter, bool from_submi url.set_query(url_encode(parameters, AK::URL::PercentEncodeSet::ApplicationXWWWFormUrlencoded)); } - LoadRequest request; - request.set_url(url); + LoadRequest request = LoadRequest::create_for_url_on_page(url, document().page()); if (effective_method == "post") { auto body = url_encode(parameters, AK::URL::PercentEncodeSet::ApplicationXWWWFormUrlencoded).to_byte_buffer();