Skip to content

Opaque origins results in shields settings getting applied globally #59276

Description

@r0hit0303

This was reported in 4051120 and 4051886. This seems like a regression that may have been introduced in this PR.

The core issue is that the primary_url is being evaluated as blank for opaque origins here.

  const GURL primary_url =
      navigation_handle->GetParentFrameOrOuterDocument()
          ? navigation_handle->GetParentFrameOrOuterDocument()
                ->GetOutermostMainFrame()
                ->GetLastCommittedOrigin()
                .GetURL()
          : url::Origin::Create(navigation_handle->GetURL()).GetURL();

which then is used to query the various ContentSettingType from the HostContentsSettingsMap and by default the map returns the default state to both get/set the corresponding type. We should ensure primary_url is not blank at this point.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions