From a900d7954785faf9a826e4ec9c3d7c286baa64a1 Mon Sep 17 00:00:00 2001 From: Jorg K Date: Thu, 3 Jan 2019 01:09:13 +0100 Subject: [PATCH] Bug 1517360 - Port bug 1517057, Part 1: Remove use of URI_FORBIDS_COOKIE_ACCESS. r=darktrojan DONTBUILD --- mailnews/addrbook/src/nsAddbookProtocolHandler.cpp | 2 +- mailnews/compose/src/nsSmtpService.cpp | 3 +-- mailnews/imap/src/nsImapService.cpp | 2 +- mailnews/imap/test/unit/test_imapProtocols.js | 1 - mailnews/local/src/nsMailboxService.cpp | 2 +- mailnews/local/src/nsPop3Service.cpp | 3 +-- mailnews/local/test/unit/test_mailboxProtocol.js | 1 - mailnews/news/src/nsNntpService.cpp | 2 +- mailnews/news/test/unit/test_nntpProtocols.js | 1 - 9 files changed, 6 insertions(+), 11 deletions(-) diff --git a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp index 64de7ab07c..3222942681 100644 --- a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp +++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp @@ -50,7 +50,7 @@ NS_IMETHODIMP nsAddbookProtocolHandler::GetDefaultPort(int32_t *aDefaultPort) NS_IMETHODIMP nsAddbookProtocolHandler::GetProtocolFlags(uint32_t *aUritype) { - *aUritype = URI_STD | URI_LOADABLE_BY_ANYONE | URI_FORBIDS_COOKIE_ACCESS; + *aUritype = URI_STD | URI_LOADABLE_BY_ANYONE; return NS_OK; } diff --git a/mailnews/compose/src/nsSmtpService.cpp b/mailnews/compose/src/nsSmtpService.cpp index 2f35a12792..ca1eee4845 100644 --- a/mailnews/compose/src/nsSmtpService.cpp +++ b/mailnews/compose/src/nsSmtpService.cpp @@ -284,8 +284,7 @@ nsSmtpService::AllowPort(int32_t port, const char *scheme, bool *_retval) NS_IMETHODIMP nsSmtpService::GetProtocolFlags(uint32_t *result) { *result = URI_NORELATIVE | ALLOWS_PROXY | URI_LOADABLE_BY_ANYONE | - URI_NON_PERSISTABLE | URI_DOES_NOT_RETURN_DATA | - URI_FORBIDS_COOKIE_ACCESS; + URI_NON_PERSISTABLE | URI_DOES_NOT_RETURN_DATA; return NS_OK; } diff --git a/mailnews/imap/src/nsImapService.cpp b/mailnews/imap/src/nsImapService.cpp index da09460310..23d4ed5135 100644 --- a/mailnews/imap/src/nsImapService.cpp +++ b/mailnews/imap/src/nsImapService.cpp @@ -2451,7 +2451,7 @@ NS_IMETHODIMP nsImapService::GetDefaultPort(int32_t *aDefaultPort) NS_IMETHODIMP nsImapService::GetProtocolFlags(uint32_t *result) { *result = URI_NORELATIVE | URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT | - URI_DANGEROUS_TO_LOAD | ALLOWS_PROXY | URI_FORBIDS_COOKIE_ACCESS + URI_DANGEROUS_TO_LOAD | ALLOWS_PROXY #ifdef IS_ORIGIN_IS_FULL_SPEC_DEFINED | ORIGIN_IS_FULL_SPEC #endif diff --git a/mailnews/imap/test/unit/test_imapProtocols.js b/mailnews/imap/test/unit/test_imapProtocols.js index e376192c77..a8b69fe9cc 100644 --- a/mailnews/imap/test/unit/test_imapProtocols.js +++ b/mailnews/imap/test/unit/test_imapProtocols.js @@ -8,7 +8,6 @@ var defaultProtocolFlags = Ci.nsIProtocolHandler.URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT | Ci.nsIProtocolHandler.URI_DANGEROUS_TO_LOAD | Ci.nsIProtocolHandler.ALLOWS_PROXY | - Ci.nsIProtocolHandler.URI_FORBIDS_COOKIE_ACCESS | Ci.nsIProtocolHandler.ORIGIN_IS_FULL_SPEC; var protocols = diff --git a/mailnews/local/src/nsMailboxService.cpp b/mailnews/local/src/nsMailboxService.cpp index 36c377dd44..bb0761372c 100644 --- a/mailnews/local/src/nsMailboxService.cpp +++ b/mailnews/local/src/nsMailboxService.cpp @@ -539,7 +539,7 @@ NS_IMETHODIMP nsMailboxService::GetProtocolFlags(uint32_t *result) { NS_ENSURE_ARG_POINTER(result); *result = URI_NORELATIVE | URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT | - URI_DANGEROUS_TO_LOAD | URI_FORBIDS_COOKIE_ACCESS + URI_DANGEROUS_TO_LOAD #ifdef IS_ORIGIN_IS_FULL_SPEC_DEFINED | ORIGIN_IS_FULL_SPEC #endif diff --git a/mailnews/local/src/nsPop3Service.cpp b/mailnews/local/src/nsPop3Service.cpp index 9b30ca0753..e47efb8b08 100644 --- a/mailnews/local/src/nsPop3Service.cpp +++ b/mailnews/local/src/nsPop3Service.cpp @@ -304,8 +304,7 @@ NS_IMETHODIMP nsPop3Service::GetDefaultDoBiff(bool *aDoBiff) NS_IMETHODIMP nsPop3Service::GetProtocolFlags(uint32_t *result) { NS_ENSURE_ARG_POINTER(result); - *result = URI_NORELATIVE | URI_DANGEROUS_TO_LOAD | ALLOWS_PROXY | - URI_FORBIDS_COOKIE_ACCESS; + *result = URI_NORELATIVE | URI_DANGEROUS_TO_LOAD | ALLOWS_PROXY; return NS_OK; } diff --git a/mailnews/local/test/unit/test_mailboxProtocol.js b/mailnews/local/test/unit/test_mailboxProtocol.js index e976c55e4f..4e6208ab40 100644 --- a/mailnews/local/test/unit/test_mailboxProtocol.js +++ b/mailnews/local/test/unit/test_mailboxProtocol.js @@ -7,7 +7,6 @@ var defaultProtocolFlags = Ci.nsIProtocolHandler.URI_NORELATIVE | Ci.nsIProtocolHandler.URI_DANGEROUS_TO_LOAD | Ci.nsIProtocolHandler.URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT | - Ci.nsIProtocolHandler.URI_FORBIDS_COOKIE_ACCESS | Ci.nsIProtocolHandler.ORIGIN_IS_FULL_SPEC; var protocols = [{ diff --git a/mailnews/news/src/nsNntpService.cpp b/mailnews/news/src/nsNntpService.cpp index e48bd5e515..fd16a7a8e6 100644 --- a/mailnews/news/src/nsNntpService.cpp +++ b/mailnews/news/src/nsNntpService.cpp @@ -1190,7 +1190,7 @@ NS_IMETHODIMP nsNntpService::GetProtocolFlags(uint32_t *aUritype) { NS_ENSURE_ARG_POINTER(aUritype); *aUritype = URI_NORELATIVE | URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT | - URI_LOADABLE_BY_ANYONE | ALLOWS_PROXY | URI_FORBIDS_COOKIE_ACCESS + URI_LOADABLE_BY_ANYONE | ALLOWS_PROXY #ifdef IS_ORIGIN_IS_FULL_SPEC_DEFINED | ORIGIN_IS_FULL_SPEC #endif diff --git a/mailnews/news/test/unit/test_nntpProtocols.js b/mailnews/news/test/unit/test_nntpProtocols.js index f064839970..53355b7a5c 100644 --- a/mailnews/news/test/unit/test_nntpProtocols.js +++ b/mailnews/news/test/unit/test_nntpProtocols.js @@ -8,7 +8,6 @@ var defaultProtocolFlags = Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE | Ci.nsIProtocolHandler.ALLOWS_PROXY | Ci.nsIProtocolHandler.URI_FORBIDS_AUTOMATIC_DOCUMENT_REPLACEMENT | - Ci.nsIProtocolHandler.URI_FORBIDS_COOKIE_ACCESS | Ci.nsIProtocolHandler.ORIGIN_IS_FULL_SPEC; var protocols = [{