Bug 1517360 - Port bug 1517057, Part 1: Remove use of URI_FORBIDS_COOKIE_ACCESS. r=darktrojan DONTBUILD
authorJorg K <jorgk@jorgk.com>
Thu, 03 Jan 2019 01:09:13 +0100
changeset 34104 a95b5c837765002c4956b0c7cdf71405cc5a375e
parent 34103 0883f1e35c1131736f36286e60b89cda8049c215
child 34105 246f3ec47ccd4792e79ef0f1d55b233c4094b477
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersdarktrojan
bugs1517360, 1517057
Bug 1517360 - Port bug 1517057, Part 1: Remove use of URI_FORBIDS_COOKIE_ACCESS. r=darktrojan DONTBUILD
mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
mailnews/compose/src/nsSmtpService.cpp
mailnews/imap/src/nsImapService.cpp
mailnews/imap/test/unit/test_imapProtocols.js
mailnews/local/src/nsMailboxService.cpp
mailnews/local/src/nsPop3Service.cpp
mailnews/local/test/unit/test_mailboxProtocol.js
mailnews/news/src/nsNntpService.cpp
mailnews/news/test/unit/test_nntpProtocols.js
--- a/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
+++ b/mailnews/addrbook/src/nsAddbookProtocolHandler.cpp
@@ -45,17 +45,17 @@ NS_IMETHODIMP nsAddbookProtocolHandler::
 
 NS_IMETHODIMP nsAddbookProtocolHandler::GetDefaultPort(int32_t *aDefaultPort)
 {
   return NS_OK;
 }
 
 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;
 }
 
 NS_IMETHODIMP nsAddbookProtocolHandler::NewURI(const nsACString &aSpec,
                                                const char *aOriginCharset, // ignored
                                                nsIURI *aBaseURI,
                                                nsIURI **_retval)
 {
--- a/mailnews/compose/src/nsSmtpService.cpp
+++ b/mailnews/compose/src/nsSmtpService.cpp
@@ -279,18 +279,17 @@ nsSmtpService::AllowPort(int32_t port, c
     // allow smtp to run on any port
     *_retval = true;
     return NS_OK;
 }
 
 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;
 }
 
 // the smtp service is also the protocol handler for mailto urls....
 
 NS_IMETHODIMP nsSmtpService::NewURI(const nsACString &aSpec,
                                     const char *aOriginCharset,  // ignored, always UTF-8.
                                     nsIURI *aBaseURI,
--- a/mailnews/imap/src/nsImapService.cpp
+++ b/mailnews/imap/src/nsImapService.cpp
@@ -2446,17 +2446,17 @@ NS_IMETHODIMP nsImapService::GetDefaultP
   NS_ENSURE_ARG_POINTER(aDefaultPort);
   *aDefaultPort = nsIImapUrl::DEFAULT_IMAP_PORT;
   return NS_OK;
 }
 
 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
   ;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapService::AllowPort(int32_t port, const char *scheme, bool *aRetVal)
--- a/mailnews/imap/test/unit/test_imapProtocols.js
+++ b/mailnews/imap/test/unit/test_imapProtocols.js
@@ -3,17 +3,16 @@
  * Test suite for IMAP nsIProtocolHandler implementations.
  */
 
 var defaultProtocolFlags =
   Ci.nsIProtocolHandler.URI_NORELATIVE |
   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 =
   [ { protocol: "imap",
       urlSpec: "imap://user@localhost/",
       defaultPort: Ci.nsIImapUrl.DEFAULT_IMAP_PORT
     }
     // XXX Imaps protocol not available via nsIProtocolHandler yet.
--- a/mailnews/local/src/nsMailboxService.cpp
+++ b/mailnews/local/src/nsMailboxService.cpp
@@ -534,17 +534,17 @@ NS_IMETHODIMP nsMailboxService::AllowPor
   *_retval = false;
   return NS_OK;
 }
 
 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
   ;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailboxService::NewURI(const nsACString &aSpec,
--- a/mailnews/local/src/nsPop3Service.cpp
+++ b/mailnews/local/src/nsPop3Service.cpp
@@ -299,18 +299,17 @@ NS_IMETHODIMP nsPop3Service::GetDefaultD
     // by default, do biff for POP3 servers
     *aDoBiff = true;
     return NS_OK;
 }
 
 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;
 }
 
 NS_IMETHODIMP nsPop3Service::NewURI(const nsACString &aSpec,
                                     const char *aOriginCharset, // ignored
                                     nsIURI *aBaseURI,
                                     nsIURI **_retval)
 {
--- a/mailnews/local/test/unit/test_mailboxProtocol.js
+++ b/mailnews/local/test/unit/test_mailboxProtocol.js
@@ -2,17 +2,16 @@
 /*
  * Test suite for getting mailbox urls via the protocol handler.
  */
 
 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 = [{
   protocol: "mailbox",
   urlSpec: "mailbox://user@localhost/",
   // mailbox protocol doesn't use a port
   defaultPort: -1,
 }];
--- a/mailnews/news/src/nsNntpService.cpp
+++ b/mailnews/news/src/nsNntpService.cpp
@@ -1185,17 +1185,17 @@ nsNntpService::GetDefaultServerPort(bool
 
     return rv;
 }
 
 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
     ;
 
     return NS_OK;
 }
 
--- a/mailnews/news/test/unit/test_nntpProtocols.js
+++ b/mailnews/news/test/unit/test_nntpProtocols.js
@@ -3,17 +3,16 @@
  * Test suite for getting news urls via the protocol handler.
  */
 
 var defaultProtocolFlags =
   Ci.nsIProtocolHandler.URI_NORELATIVE |
   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 = [{
   protocol: "news",
   urlSpec: "news://user@localhost/",
   defaultPort: Ci.nsINntpUrl.DEFAULT_NNTP_PORT,
 },
 // XXX News secure protocol not working yet.