mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Issue #2542 - Part 5: Assume browser-initiated requests for unspecified content types to always be user-triggered.
This commit is contained in:
parent
9846090a38
commit
0ef8b05101
1 changed files with 6 additions and 0 deletions
|
|
@ -186,6 +186,12 @@ bool IsUserTriggeredForSecFetchSite(nsIHttpChannel* aHTTPChannel) {
|
|||
nsCOMPtr<nsILoadInfo> loadInfo = aHTTPChannel->GetLoadInfo();
|
||||
nsContentPolicyType contentType = loadInfo->InternalContentPolicyType();
|
||||
|
||||
// A request issued by the browser is always user initiated.
|
||||
if (nsContentUtils::IsSystemPrincipal(loadInfo->TriggeringPrincipal()) &&
|
||||
contentType == nsIContentPolicy::TYPE_OTHER) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// only requests wich result in type "document" are subject to
|
||||
// user initiated actions in the context of SecFetch.
|
||||
if (contentType != nsIContentPolicy::TYPE_DOCUMENT &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue