Commit 07a3c0f1 authored by Steven Bingler's avatar Steven Bingler Committed by Commit Bot

IsBannedCrossSiteAuth() to use IsSchemelesslyFirstParty()

IsFirstParty() changed recently to depend on the SchemefulSameSite
feature. When SchemefulSameSite is enabled IsFirstParty() won't behave
as IsBannedCrossSiteAuth() is expecting.

This CL changes IsFirstParty() to only check URLs schemelessly which
aligns with current behavior and IsBannedCrossSiteAuth()'s expectations.

Bug: 1030938
Change-Id: I3cfe190c530333fde0d9292899a2f71d8d813364
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146300Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Steven Bingler <bingler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759291}
parent 8395293b
...@@ -305,7 +305,7 @@ bool IsBannedCrossSiteAuth(network::ResourceRequest* resource_request, ...@@ -305,7 +305,7 @@ bool IsBannedCrossSiteAuth(network::ResourceRequest* resource_request,
extra_data->allow_cross_origin_auth_prompt(); extra_data->allow_cross_origin_auth_prompt();
} }
if (first_party.IsFirstParty(request_url)) { if (first_party.IsSchemelesslyFirstParty(request_url)) {
// If the first party is secure but the subresource is not, this is // If the first party is secure but the subresource is not, this is
// mixed-content. Do not allow the image. // mixed-content. Do not allow the image.
if (!allow_cross_origin_auth_prompt && if (!allow_cross_origin_auth_prompt &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment