Currently, when a custom uri scheme handler is registered, its existence is not passed to the network process. Consequently, when creating a SecurityOrigin object for an URI that uses a custom scheme handler, the instance may be created as unique due shouldTreatAsUniqueOrigin() not detecting the associated scheme as registered (in LegacySchemeRegistry).
This will cause calls to SecurityPolicy::isAccessAllowed() to not return the correct authorization in case a custom URI is whitelisted using webkit_web_extension_add_origin_access_whitelist_entry() API, which leads to the inclusion of the "Origin" header with the custom URI in network requests when it should not be included in such case.
Currently, when a custom uri scheme handler is registered, its existence is not passed to the network process. Consequently, when creating a SecurityOrigin object for an URI that uses a custom scheme handler, the instance may be created as unique due shouldTreatAsUniqueOrigin() not detecting the associated scheme as registered (in LegacySchemeRegistry).
This will cause calls to SecurityPolicy::isAccessAllowed() to not return the correct authorization in case a custom URI is whitelisted using webkit_web_extension_add_origin_access_whitelist_entry() API, which leads to the inclusion of the "Origin" header with the custom URI in network requests when it should not be included in such case.