Add preference to allow the loading of FTP subresources for corner cases

This commit is contained in:
wolfbeast 2019-07-14 22:41:01 +02:00 committed by Roy Tam
commit 797f3eae35
4 changed files with 19 additions and 0 deletions

View file

@ -98,6 +98,9 @@ nsContentSecurityManager::CheckFTPSubresourceLoad(nsIChannel* aChannel)
// We dissallow using FTP resources as a subresource everywhere.
// The only valid way to use FTP resources is loading it as
// a top level document.
if (!mozilla::net::nsIOService::BlockFTPSubresources()) {
return NS_OK;
}
nsCOMPtr<nsILoadInfo> loadInfo = aChannel->GetLoadInfo();
if (!loadInfo) {