mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibWeb: Implement should block mixed content request
This commit is contained in:
committed by
Andreas Kling
parent
33cfa8f5a6
commit
8f0d035145
@@ -46,6 +46,7 @@
|
||||
#include <LibWeb/HighResolutionTime/TimeOrigin.h>
|
||||
#include <LibWeb/Loader/LoadRequest.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/MixedContent/AbstractOperations.h>
|
||||
#include <LibWeb/Platform/EventLoopPlugin.h>
|
||||
#include <LibWeb/ReferrerPolicy/AbstractOperations.h>
|
||||
#include <LibWeb/SRI/SRI.h>
|
||||
@@ -241,7 +242,7 @@ WebIDL::ExceptionOr<JS::GCPtr<PendingResponse>> main_fetch(JS::Realm& realm, Inf
|
||||
// 7. If should request be blocked due to a bad port, should fetching request be blocked as mixed content, or
|
||||
// should request be blocked by Content Security Policy returns blocked, then set response to a network error.
|
||||
if (Infrastructure::block_bad_port(request) == Infrastructure::RequestOrResponseBlocking::Blocked
|
||||
|| false // FIXME: "should fetching request be blocked as mixed content"
|
||||
|| MixedContent::should_fetching_request_be_blocked_as_mixed_content(request) == Infrastructure::RequestOrResponseBlocking::Blocked
|
||||
|| false // FIXME: "should request be blocked by Content Security Policy returns blocked"
|
||||
) {
|
||||
response = Infrastructure::Response::network_error(vm, "Request was blocked"sv);
|
||||
|
||||
Reference in New Issue
Block a user