Bug 1345474 - Check incognito access for webRequest api r=kmag
Depends on D4112 Differential Revision: https://phabricator.services.mozilla.com/D5571
This commit is contained in:
@@ -522,6 +522,14 @@ bool ChannelWrapper::Matches(
|
||||
}
|
||||
|
||||
if (aExtension) {
|
||||
// Verify extension access to private requests
|
||||
if (!aExtension->PrivateBrowsingAllowed()) {
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = GetLoadInfo();
|
||||
if (loadInfo && loadInfo->GetOriginAttributes().mPrivateBrowsingId > 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool isProxy =
|
||||
aOptions.mIsProxy && aExtension->HasPermission(nsGkAtoms::proxy);
|
||||
// Proxies are allowed access to all urls, including restricted urls.
|
||||
|
||||
Reference in New Issue
Block a user