summaryrefslogtreecommitdiffstats
path: root/mailnews/compose
diff options
context:
space:
mode:
Diffstat (limited to 'mailnews/compose')
-rw-r--r--mailnews/compose/src/nsMsgAttachmentHandler.cpp2
-rw-r--r--mailnews/compose/src/nsMsgComposeService.cpp2
-rw-r--r--mailnews/compose/src/nsMsgQuote.cpp2
-rw-r--r--mailnews/compose/src/nsSmtpService.cpp7
-rw-r--r--mailnews/compose/src/nsURLFetcher.cpp16
5 files changed, 18 insertions, 11 deletions
diff --git a/mailnews/compose/src/nsMsgAttachmentHandler.cpp b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
index f36f2e29b..0ae253ed6 100644
--- a/mailnews/compose/src/nsMsgAttachmentHandler.cpp
+++ b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
@@ -663,7 +663,7 @@ nsMsgAttachmentHandler::SnarfMsgAttachment(nsMsgCompFields *compFields)
aURL,
nullptr,
nullPrincipal,
- nsILoadInfo::SEC_NORMAL,
+ nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER);
if (NS_FAILED(rv))
goto done;
diff --git a/mailnews/compose/src/nsMsgComposeService.cpp b/mailnews/compose/src/nsMsgComposeService.cpp
index 944f7dbe3..bc202b7df 100644
--- a/mailnews/compose/src/nsMsgComposeService.cpp
+++ b/mailnews/compose/src/nsMsgComposeService.cpp
@@ -1362,7 +1362,7 @@ nsMsgComposeService::RunMessageThroughMimeDraft(
url,
nullptr,
nullPrincipal,
- nsILoadInfo::SEC_NORMAL,
+ nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER);
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_NewChannel failed.");
if (NS_FAILED(rv))
diff --git a/mailnews/compose/src/nsMsgQuote.cpp b/mailnews/compose/src/nsMsgQuote.cpp
index ce8e1b5d0..2bddae520 100644
--- a/mailnews/compose/src/nsMsgQuote.cpp
+++ b/mailnews/compose/src/nsMsgQuote.cpp
@@ -188,7 +188,7 @@ nsMsgQuote::QuoteMessage(const char *msgURI, bool quoteHeaders,
nullptr,
systemPrincipal,
nullptr,
- nsILoadInfo::SEC_NORMAL,
+ nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
getter_AddRefs(mQuoteChannel));
diff --git a/mailnews/compose/src/nsSmtpService.cpp b/mailnews/compose/src/nsSmtpService.cpp
index 9f9295934..9409811ff 100644
--- a/mailnews/compose/src/nsSmtpService.cpp
+++ b/mailnews/compose/src/nsSmtpService.cpp
@@ -357,8 +357,11 @@ NS_IMETHODIMP nsSmtpService::NewChannel2(nsIURI *aURI,
if (NS_FAILED(rv))
return rv;
- return NS_NewInputStreamChannel(_retval, aURI, pipeIn,
- nullPrincipal, nsILoadInfo::SEC_NORMAL,
+ return NS_NewInputStreamChannel(_retval,
+ aURI,
+ pipeIn,
+ nullPrincipal,
+ nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
NS_LITERAL_CSTRING("application/x-mailto"));
}
diff --git a/mailnews/compose/src/nsURLFetcher.cpp b/mailnews/compose/src/nsURLFetcher.cpp
index b564ab9a4..ca2dcd7c6 100644
--- a/mailnews/compose/src/nsURLFetcher.cpp
+++ b/mailnews/compose/src/nsURLFetcher.cpp
@@ -7,7 +7,7 @@
#include "msgCore.h" // for pre-compiled headers
#include "nsCOMPtr.h"
-#include "nsNullPrincipal.h"
+#include "nsIScriptSecurityManager.h"
#include <stdio.h>
#include "nscore.h"
#include "nsIFactory.h"
@@ -317,15 +317,19 @@ nsURLFetcher::FireURLRequest(nsIURI *aURL, nsIFile *localFile, nsIOutputStream *
nsCOMPtr<nsIURILoader> pURILoader (do_GetService(NS_URI_LOADER_CONTRACTID));
NS_ENSURE_TRUE(pURILoader, NS_ERROR_FAILURE);
- nsCOMPtr<nsIPrincipal> nullPrincipal =
- do_CreateInstance("@mozilla.org/nullprincipal;1", &rv);
- NS_ENSURE_SUCCESS(rv, rv);
+ nsCOMPtr<nsIScriptSecurityManager>
+ secMan(do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv));
+ NS_ENSURE_SUCCESS(rv,rv);
+
+ nsCOMPtr<nsIPrincipal> systemPrincipal;
+ rv = secMan->GetSystemPrincipal(getter_AddRefs(systemPrincipal));
+ NS_ENSURE_SUCCESS(rv,rv);
nsCOMPtr<nsIChannel> channel;
rv = NS_NewChannel(getter_AddRefs(channel),
aURL,
- nullPrincipal,
- nsILoadInfo::SEC_NORMAL,
+ systemPrincipal,
+ nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL,
nsIContentPolicy::TYPE_OTHER,
nullptr, // aLoadGroup
this); // aCallbacks