Граф коммитов

1502 Коммитов

Автор SHA1 Сообщение Дата
Ping Chen 55947a707b Bug 1762688 - Init ImapProtocolHandler.jsm and ImapChannel.jsm to handle imap: url. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D146037

--HG--
extra : rebase_source : 6a52a64a6e3bbfa65f8866626027acf175e1fbd0
2022-05-11 13:27:08 +03:00
Ben Campbell 3e655bee0e Bug 1733849 - Add nsIMsgFolder.getLocalMsgStream() to unify local/offline message reading. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D144503

--HG--
extra : rebase_source : bbde9b5d5a252a1332915a292bce5135ac5e692c
2022-05-11 13:26:10 +03:00
Ping Chen 92c4e28ad4 Bug 1762690 - Handle EXISTS and EXPUNGE in NOOP responses. r=mkmelin
Delete messages not found on server.

Depends on D145825.

Differential Revision: https://phabricator.services.mozilla.com/D145826

--HG--
extra : rebase_source : 26a62fafae96bf70188f1a0c15576b6e80c80eb6
2022-05-07 08:17:27 +00:00
Ping Chen ff032af91a Bug 1762690 - Rewrite ImapResponse to do incremental parsing. r=mkmelin
Because a single response can span multiple chunks, and can contain multiple types of data.

Differential Revision: https://phabricator.services.mozilla.com/D145825

--HG--
extra : rebase_source : 9a4b200fdd51c35687e384ac4f1916fa8e04189a
2022-05-10 00:43:53 +00:00
Ping Chen 36c713a3d0 Bug 1762690 - Update message flags in SELECT and NOOP response. r=mkmelin
NOOP can return more than flags changes, will handle them in later patches.

Depends on D145412.

Differential Revision: https://phabricator.services.mozilla.com/D145413

--HG--
extra : moz-landing-system : lando
2022-05-05 03:59:24 +00:00
Ping Chen cc876127de Bug 1762690 - Use IDLE and NOOP commands to receive updates from server. r=mkmelin
Rename _idleConnections to _freeConnections to avoid confusion with the IDLE command.

This patch only adds code to send IDLE/NOOP, follow-up patches will actually handle IDLE/NOOP responses.

Differential Revision: https://phabricator.services.mozilla.com/D145412

--HG--
extra : moz-landing-system : lando
2022-05-05 03:59:24 +00:00
Rachel Martin eb2ad913ef Bug 1766974 - Fix typos in mail and mailnews found with codespell. r=Paenglab,john.bieling,kaie
--HG--
extra : amend_source : 256a23051dda81f4e807183e44947a731d36b756
2022-04-30 13:30:36 +03:00
Magnus Melin 67ef3b6e37 Bug 1767005 - Port bug 683785 to Thunderbird - Create timers directly instead of with do_CreateInstance. r=rjl
Differential Revision: https://phabricator.services.mozilla.com/D145068

--HG--
extra : amend_source : 71cc123b6f56f2db0298d7e7ca273b5d1da7a96e
2022-04-29 15:06:00 +03:00
Ping Chen bde721aa66 Bug 1762689 - Prevent showing multiple auth prompt for the same server. r=mkmelin
Depends on D144698.

Differential Revision: https://phabricator.services.mozilla.com/D144699

--HG--
extra : amend_source : 0b86193ba743f63c7a36329a5ebdf17593ccb499
2022-04-27 13:01:53 +03:00
Ping Chen 6a9322e949 Bug 1762689 - Reuse connections in ImapIncomingServer.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D144698

--HG--
extra : amend_source : aa160c67980208c3e9770af29e71fec5148da4b1
2022-04-27 13:01:38 +03:00
Magnus Melin eebcff010a Bug 1766247 - Port Bug 1766238 to Thunderbird - stop passing more than one argument to ChromeUtils.import. r=freaktechnik
Differential Revision: https://phabricator.services.mozilla.com/D144567

--HG--
extra : amend_source : 4dc54e1b5e3884edec427a734e70772a976bc6ce
2022-04-26 13:17:44 +03:00
Ping Chen 853101e7e4 Bug 1762690 - Support setting msg flags in ImapClient.jsm. r=mkmelin
Load msg in messagepane works as well.

Depends on D144253.

Differential Revision: https://phabricator.services.mozilla.com/D144254

--HG--
extra : amend_source : 4618d96542b6f4ba7e523d3efabe2be76549e2aa
2022-04-22 09:11:17 +03:00
Ping Chen cd116e28d9 Bug 1762688 - Remove unused outURL from addMessageFlags/subtractMessageFlags in nsIImapService.idl. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D144253

--HG--
extra : amend_source : 22bf3978e604a9d621cbbda9f2e76b592f17491d
2022-04-22 09:11:00 +03:00
Alessandro Castellani 654a1fdc49 Bug 1765650 - Port bug 1735746 to add extra argument to extProtService->LoadURI method. rs=bustage-fix
Differential Revision: https://phabricator.services.mozilla.com/D144230

--HG--
extra : moz-landing-system : lando
2022-04-20 22:47:38 +00:00
Ping Chen f36ea9373f Bug 1762690 - Save fetched IMAP msg to folder. r=mkmelin
New messages should show up in the threadPane. Select a message to show in messagePane doesn't work yet.

Depends on D143965.

Differential Revision: https://phabricator.services.mozilla.com/D143967

--HG--
extra : amend_source : 74c83c8ce0d39db0223a815159d8a89f7c4cf912
2022-04-19 11:00:40 +02:00
Ping Chen 6012a71398 Bug 1762690 - Change getMsgHdrs to scriptable msgHdrs attribute in nsIImapHeaderInfo. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D143965

--HG--
extra : amend_source : 53d3486411a51fb6845d166699336ec1c03cd317
2022-04-19 10:59:53 +02:00
Ping Chen dd1e0b328e Bug 1762690 - Introduce ImapResponse.jsm to parse server responses. r=mkmelin
Functions are added in ImapClient to send UID FETCH request, only to test ImapResponse.

Differential Revision: https://phabricator.services.mozilla.com/D143565

--HG--
extra : amend_source : 0c2a0ed588f24f628a8a81c487eb263ed944d5a1
2022-04-13 11:10:41 +02:00
Ping Chen 5abfa33aca Bug 1762690 - Support PLAIN auth in ImapClient.jsm. r=mkmelin
Depends on D143014.

Differential Revision: https://phabricator.services.mozilla.com/D143015

--HG--
extra : amend_source : 488571159d3dbcd6eeb8330d2ae27438da72f50d
2022-04-07 12:44:23 +03:00
Ping Chen b0c59cd39a Bug 1762690 - Init ImapClient.jsm to interact with IMAP server.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D143014

--HG--
extra : amend_source : b1c69cfd20d135bab7ea4044ca5df0fb9572a170
2022-04-07 12:44:11 +03:00
Ping Chen 5e6c5732cc Bug 1762688 - Init ImapModuleLoader.jsm to prepare for rewriting IMAP in JS. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D142751

--HG--
extra : amend_source : 27015dcdd3f0cc6b965041065951a588c2b758b6
2022-04-04 12:28:21 +02:00
Sean Burke 121378611f Bug 1761129 - remove misplaced Java modelines. r=#thunderbird-reviewers,john.bieling
Differential Revision: https://phabricator.services.mozilla.com/D141898

Depends on D141897

--HG--
extra : rebase_source : ee222beb6d290b01de2b08600d80d3fb2c47e5e4
extra : histedit_source : 1d3416cb5fab73a9ae0889aa5bb008334b28af29
2022-03-23 22:21:20 +00:00
Ben Campbell 2e0edf0ee9 Bug 1760353 - Fix possible bogus release of un-held waitForBodyIdsMonitor object in IMAP. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D141815

--HG--
extra : rebase_source : eb0f8b25a6669a2d3727a1dbd8f3f9ea7bbf1d8d
extra : histedit_source : 0d42272cd54422be2ab4504d8ef17db88f44b0a6
2022-03-23 02:45:22 +00:00
Nicolai Kasper f21f8810e2 Bug 1571683 - Part 7: Remove asyncTestUtils.js. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D141386

--HG--
extra : moz-landing-system : lando
2022-03-22 04:47:12 +00:00
Magnus Melin cf64483e8c Bug 1760353 - Fix m_waitForBodyIdsMonitor issue after bug 1759501. r=rjl
--HG--
extra : amend_source : 442b865de0044b716558e07fc22bf50321a74d9a
2022-03-18 23:01:18 +02:00
Ben Campbell 61fcd31e91 Bug 1756520 - Separate multifolder compaction management from folder compaction classes. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D140996

--HG--
extra : amend_source : 7f8dd34321607d91d96a7c5f1a74cf5622498952
2022-03-16 12:31:48 +02:00
Ben Campbell 9efc4064f5 Bug 1756520 - Remove redundant arg in nsIMsgFolder.compactAll(). r=mkmelin
In nsIMsgFolder.compactAll(), the aCompactOfflineAlso param was always true
for IMAP folders, and always false for local folders. The calling code
shouldn't have to deal with that check.

Differential Revision: https://phabricator.services.mozilla.com/D139352

Depends on D139327
2022-02-22 05:57:59 +00:00
Ben Campbell 9958d1f767 Bug 1756520 - Remove nsMsgDBFolder::CompactOfflineStore(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D139327
2022-02-22 00:23:33 +00:00
Geoff Lankow ae96a55794 Bug 1751880 - Register mailnews/imap/test/unit/xpcshell_maildir.ini as a separate test manifest. r=BenC
As well as splitting up the manifests I've made "run-sequentially" apply to all of the tests, and added tags to each of the manifests so you can choose to run one version of the tests with the --tag argument.

Differential Revision: https://phabricator.services.mozilla.com/D137006

--HG--
extra : moz-landing-system : lando
2022-02-07 22:36:08 +00:00
Nicolai Kasper 8556af48e6 Bug 1571683 - Part 2: Replace asyncTestUtils.js functionality with promises in mailnews/imap/test/unit/**. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D136609
2022-01-24 15:36:39 -05:00
Ben Campbell a497e0f1d5 Bug 1718998 - Add comment blocks above some nsImapProtocol URL-processing functions. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D136090
2022-01-19 21:29:37 +00:00
Ben Campbell ec09e99b87 Bug 1750474 - Misc tidyups in nsImapMailFolder::UpdateFolderWithListener(). r=mkmelin
- Removed some redundant NS_SUCCEEDED(rv) checking.
- Shifted about selectFolder logic for clarity.

Differential Revision: https://phabricator.services.mozilla.com/D136091

--HG--
extra : amend_source : cf87b0b78be498a4400a86e68b2e9e464114c696
2022-01-19 12:10:27 +02:00
Ben Campbell 19632e877b Bug 1748940 - Use nsTArray<> instead of nsTArray<>* for nsIMAPBodypartMultipart subpart list. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D135304

--HG--
extra : moz-landing-system : lando
2022-01-17 21:37:45 +00:00
Ben Campbell 4710249ad8 Bug 1748940 - Assorted minor nsImapBodyShellCache tidying. r=mkmelin
- Add central definition for max size (kMaxEntries).
- Ensure a free slot before adding new entry (rather than going oversize then trimming back).
- Embed nsTArray<> rather than separate heap alloc.
- Reduce work done during dtor and clear.
- Ditch static Create() function and make ctor public.
- Remove returncodes for fns which don't really need them.

Differential Revision: https://phabricator.services.mozilla.com/D135298

--HG--
extra : moz-landing-system : lando
2022-01-17 21:37:45 +00:00
Ben Campbell d187b46971 Bug 847356 - Ensure nsImapProtocol is kept in existence for duration of nsImapBodyShell::Generate(). r=mkmelin
Additionally, this changes nsImapBodyShell to no longer retain nsImapProtocol
as a member variable. nsImapBodyShells are cached, so it seems irresponsible
for them to hold a raw pointer to the connection. Instead, the connection is
passed in as an extra parameter to nsImapBodyShell::Generate().
There's also a little light tidying and cruft removal.

Differential Revision: https://phabricator.services.mozilla.com/D135191

--HG--
extra : amend_source : 0e95356cc328b2073e3e2a61d7e373084bf6138f
2022-01-17 12:17:32 +02:00
Rachel Martin 19429999ab Bug 1746695 - Improve method and variable names related to charset detection. r=mkmelin
--HG--
extra : amend_source : e085fc3ed69dc2d119d2c6953d1db0e5bb2f2f99
2021-12-21 12:10:15 +02:00
Magnus Melin 85f2768bcf Bug 1668926 - fix unused rv value in RecursiveCopy(). r=benc
CID 1260186 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In RecursiveCopy(nsIFile *, nsIFile *): A value assigned to a variable is never used.

Differential Revision: https://phabricator.services.mozilla.com/D133413

--HG--
extra : rebase_source : 7cb148e645af9a85b37a75f12eeb6d24d1e12224
2021-12-15 09:00:36 +02:00
Magnus Melin 49295c9c3f Bug 1668926 - fix unused value in nsImapMailFolder::​SyncFlags(). r=benc
CID 1260155 Unused value

An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsImapMailFolder::​SyncFlags(nsIImapFlagAndUidState *): A value assigned to a variable is never used

Differential Revision: https://phabricator.services.mozilla.com/D133412

--HG--
extra : rebase_source : 40cc185a522eed25273e87a9390adffa5b954bb3
extra : amend_source : 7ba386d21e31290a989360c601b88ef51f5921a9
2021-12-15 11:58:08 +02:00
Geoff Lankow d95a6a9fac Bug 1745875 - Port bug 1741665 - Align nsCString's public size_type better with other C++ APIs. r=mkmelin
Port of https://hg.mozilla.org/mozilla-central/rev/43563b9a5f5d132449ec86456cf246b85ccf8306.

Differential Revision: https://phabricator.services.mozilla.com/D133720

--HG--
extra : amend_source : 54dc769853a602a69c2347ef9613235bf9b46e63
2021-12-14 18:47:42 +13:00
Nicolai Kasper 9b574bec3e Bug 1676114 - Part 2: Copy contents of messageModifier.js into MessageGenerator.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D132915
2021-12-09 12:42:54 +00:00
Makoto Kato cc9fb28213 Bug 1742991 - nsImapProtocol should not inherit nsIRunnable. r=mkmelin
`nsImapProtocol::Run` has a race condition between main thread and IMAP thread.

IMAP thread is running `Runnable` by nsImapProtocol. But it is possible to run
`releaseOnMain` for `nsIImapProtocol` before decrementing reference count of
`Runnable` by `nsImapProtocol` on IMAP thread. So then, the destructor of
`nsImapProtocol` may run on IMAP thread that is shutting down.

In other words, this sequence is the following.

1. `nsImapProtocol::Run()` calls `NS_ReleaseOnMainThread` to dereference
   `nsImapProtocol` on Imap thread.
2. `nsImapProtocol` is released in main thread since we used
   `NS_ReleaseOnMainThread`.
3. `nsThread::ProcessNextEvent` releases `nsImapProtocol` on Imap thread since
   `nsIRunnble` is done and `nsImapProtocol` inherits `nsIRunnable`.
4. `nsImapProtocol`'s reference is nothing, then it is deleted on Imap thread.

So `nsImapProtocol` shouldn't inherit `nsIRunnable`.

Differential Revision: https://phabricator.services.mozilla.com/D132920

--HG--
extra : moz-landing-system : lando
2021-12-07 06:56:27 +00:00
Gene Smith a1a691cfde Bug 1737293 - Prevent large headers from triggering NS_ASSERTION. r=benc
Note: This change only affects debug builds.
2021-11-26 01:08:28 -05:00
Rob Lemley 386bb17fb7 Backed out changeset 9fe3c5e2056f (bug 1737293) for build errors. r=backout a=rjl 2021-12-03 17:57:18 -05:00
Gene Smith aa38ac774f Bug 1737293 - Prevent large headers from triggering NS_ASSERTION. r=benc
Note: This change only affects debug builds.

--HG--
extra : amend_source : ac27f6b2f36c1e40eb3268614310f10915e5e103
2021-11-26 01:08:28 -05:00
Ping Chen 93dc9dbbb5 Bug 1741805 - Prevent tmp attachments being removed before msg is created in nsMsgCompose. r=mkmelin
- in ~nsMsgCompose, remove tmp attachments only if mMsgSend is not inited
- remove tmp attachments after mMsgSend->CreateAndSendMessage returns
- add tests for forwarding messages in filters

Differential Revision: https://phabricator.services.mozilla.com/D132668
2021-12-02 08:10:33 +00:00
Rob Lemley 0452cde9be Bug 1743868 - Port bug 1705211. rs=bustage-fix
Differential Revision: https://phabricator.services.mozilla.com/D132622

--HG--
extra : amend_source : c7a9a535d018c15236945a9e7a9fe2a5048bb8c0
2021-12-01 13:32:02 -05:00
Rachel Martin e95f982936 Bug 1739789 - Change search-related URI APIs and all other remaining ones to AUTF8String. r=mkmelin 2021-11-26 22:43:40 +01:00
Rachel Martin dbc4af4f95 Bug 1739903 - Change filter-related URI APIs to AUTF8String. r=mkmelin 2021-11-25 12:42:03 +02:00
Rachel Martin 41593018fa Bug 1739814 - Change remaining URI APIs to from raw string to smart string. r=mkmelin 2021-11-22 20:00:08 +01:00
Geoff Lankow e65771a4d7 Bug 1742503 - Fix build bustage: 'mozilla/dom/FetchTypes.h' file not found. rs=bustage-fix
Differential Revision: https://phabricator.services.mozilla.com/D131859

--HG--
extra : amend_source : 066dc4c8b81efa2459f472c0a995358e20da75a7
2021-11-23 11:34:57 +13:00
Rachel Martin 1471a7836a Bug 1739814 - Change more URI APIs to from raw string to smart string. Fixes saving drafts and smart/unified/virtual folders. r=mkmelin 2021-11-22 12:22:49 +02:00
Geoff Lankow 8c9c7ff446 Bug 1741542 - Give the name of the changed property in nsIDBChangeListener.onHdrPropertyChanged. r=mkmelin
I modified the nsIDBChangeListener interface to pass the name of the changed property when a property changes. This wasn't strictly necessary but it is a useful optimisation.

Change listeners aren't even notified if a change happens to a nsMsgHdr object directly (it writes straight to the database and doesn't tell anybody) but that doesn't seem to be a major problem as the changes I'm interested in go through nsMsgDatabase.

Differential Revision: https://phabricator.services.mozilla.com/D131319

--HG--
extra : rebase_source : dfbf9a5a89582782fdacb92558c209233ef2ce43
extra : histedit_source : 4b58f65c41cc8d770661f3c767b38935f78a13f4
2021-11-17 15:46:56 +13:00
Rachel Martin 8e08ba891c Bug 1741619 - Change most URI APIs to from raw string to smart string. r=mkmelin
--HG--
extra : rebase_source : 182d285562d18b88558a4a26a508a40956b75ed4
2021-11-19 20:23:48 +02:00
Rachel Martin 62b0329bc2 Bug 1741559 - Replace use of nsCString().get() with PromiseFlatCString().get() in mailnews. r=mkmelin
--HG--
extra : rebase_source : e5b7270dc94d93064b7a61adc7f864ea853ce34d
2021-11-19 20:21:45 +02:00
Mark Banner 07e0b844e0 Bug 1739784 - Fix nsIMsgFolder.getUriForMsg, nsIMsgMessengerService.DisplayMessage and nsIMsgMessengerServices.streamMessage to handle non-ascii URIs. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D130554

--HG--
extra : moz-landing-system : lando
2021-11-08 12:39:28 +00:00
Magnus Melin 85333d993b Bug 1668926 - fix unitialized pointer field in nsImapMailboxSpec::​nsImapMailboxSpec. r=benc
CID 137604 Uninitialized pointer field
The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.
In nsImapMailboxSpec::​nsImapMailboxSpec(): A pointer field is not initialized in the constructor

Differential Revision: https://phabricator.services.mozilla.com/D130032

--HG--
extra : rebase_source : 6b45a707e4cf15976a0e4537ac4960f107e0ab4c
2021-10-31 21:56:18 +02:00
Magnus Melin 0a4b246081 Bug 1668926 - fix unitialized members in nsImapProtocol::​nsImapProtocol. r=benc
CID 1137611 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.
In nsImapProtocol::​nsImapProtocol(): A scalar field is not initialized by the constructor

Differential Revision: https://phabricator.services.mozilla.com/D130031

--HG--
extra : rebase_source : b0399ef34290aacf4cdbcaa89f053f09d6d058fa
2021-10-31 21:48:29 +02:00
Magnus Melin 9f46e749fc Bug 1543184 - try to fix crash in [@ shutdownhang | nsSyncStreamListener::Available]. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D130030

--HG--
extra : rebase_source : b1bba1febf3f9d040e1040d144200de970f7ee48
2021-11-01 14:24:03 +02:00
Magnus Melin 37baa8dd18 Backed out changeset 70c0061f9f84 (bug 1734847) for test failures. r=backout DONTBUILD
mailnews/search/test/unit/test_quarantineFilterMove.js is crashing

--HG--
extra : amend_source : 72c9e867d7410a6d108ec8dc1c6d1a3e2dfe74e1
2021-11-05 15:39:56 +02:00
Magnus Melin ec7feb64d7 Bug 1734847 - Backed out changeset 2c8857af0eb3 (bug 1728924) for causing .msf corruption. rs=backout
--HG--
extra : rebase_source : d13d982f3bcb91f3dac099d64b517e578638691a
2021-11-05 12:30:19 +02:00
Mark Banner c4fe00d87f Bug 689544 - Change nsIMsgMessageService:OpenAttachment to handle UTF8 strings to allow it to be called direct from JS. r=mkmelin
This also avoids unnecessary nsCString -> char* -> nsCString conversions.

Differential Revision: https://phabricator.services.mozilla.com/D129709

--HG--
extra : amend_source : b8aac5503307de18819c70c55559bc1b24c65e2d
2021-10-28 12:59:49 +03:00
Magnus Melin 5924ba7952 Bug 1668926 - coverity - fix logically dead code in nsImapUrl::​AllocateCanonicalPath. r=benc
CID 1137379 Logically dead code
notnull: At condition currentPath, the value of currentPath cannot be nullptr.

Differential Revision: https://phabricator.services.mozilla.com/D128573

--HG--
extra : rebase_source : b0e27f072d019c50f3cf3c263c35c41293721d8c
extra : amend_source : 2eef04ba1c6d88d6ec06da21f7cd67fe0cfbbae0
2021-10-20 13:27:40 +03:00
Magnus Melin 4505a5eb2f Bug 1734363 - remove unused nsIImapService.fetchMessage() additionalHeader param. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D127770

--HG--
extra : rebase_source : 5d6b2c66ce7eb7a91fadbcfbae926efd93369b50
2021-10-07 10:18:14 +03:00
Magnus Melin 255fb96aab Bug 1734363 - remove unused nsIMsgMessageService.DisplayMessageForPrinting(). r=benc
Removing it, and including some clang-formats

Differential Revision: https://phabricator.services.mozilla.com/D127640

--HG--
extra : rebase_source : baa4bebfe648d45d8f86fd2287fef5999483aebb
2021-10-06 14:11:33 +03:00
Ben Campbell f4bc63cba0 Bug 1733849 - Use nsIMsgFolder.getSlicedOfflineFileStream() instead of getOfflineFileStream(). r=mkmelin
This is an intermediate step. We want to get all the message-reading code
working with streams that contain just a single message, rather than with an
unwieldly mbox stream + offset/size combo.
Then we'll remove getOfflineFileStream() entirely and rename
getSlicedOfflineFileStream() to replace it.

Differential Revision: https://phabricator.services.mozilla.com/D127372
2021-10-04 22:25:50 +00:00
Ben Campbell 7c3a61c344 Bug 1733504 - Remove unused aLocalOnly param from nsIMsgFolder.fetchMsgPreviewText(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D127189

--HG--
extra : amend_source : 8f265434f337a7ade95130b6c830a5529ba372b1
2021-10-03 13:52:15 +03:00
Martin Giger d1c1e35fc5 Bug 1713786 - Do mime detection instead of charset override. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D126814

--HG--
extra : moz-landing-system : lando
2021-10-01 22:09:51 +00:00
Ben Campbell 19824555f1 Bug 1683590 - Remove nsISupport use in nsIFolderListener.OnItemAdded/Removed callbacks. r=mkmelin
Breaks up OnItemAdded() and OnItemRemoved() into folder and message-specific
versions. Also tidies up naming of the callback functions in the .idl while
we're here e.g. OnItemEvent() becomes onFolderEvent().

Differential Revision: https://phabricator.services.mozilla.com/D126593

--HG--
extra : rebase_source : 09c95d139bc512626e7974b95b94fa91cead0ef6
2021-10-01 12:46:34 +03:00
Magnus Melin 5a9a321948 Backed out changeset 89021f52292d (bug 1683590) for build bustage. rs=backout
--HG--
extra : amend_source : 2c883d9c7c36aef0d5c3b4a0a489331049079147
2021-09-29 13:42:41 +03:00
Ben Campbell 0bc654a66d Bug 1683590 - Remove nsISupport use in nsIFolderListener.OnItemAdded/Removed callbacks. r=mkmelin
Breaks up OnItemAdded() and OnItemRemoved() into folder and message-specific
versions. Also tidies up naming of the callback functions in the .idl while
we're here e.g. OnItemEvent() becomes onFolderEvent().

Differential Revision: https://phabricator.services.mozilla.com/D126593

--HG--
extra : amend_source : 7e86abd0191c081cbce48965b6d064f146fc7f88
2021-09-29 12:30:19 +03:00
Ben Campbell d52485e055 Bug 1683590 - Remove nsISupport use in nsIMsgFolder.NotifyItemAdded/NotifyItemRemoved. r=mkmelin
Removes .NotifyItemAdded() and .NotifyItemRemoved() which both used nsISupports
and replaces them with specific folder and nsIMsgDBHdr versions.
Still calls the nsISupports-based nsIFolderListener OnItemAdded/OnItemRemoved()
callbacks but lays the groundwork for doing the same thing there.

Differential Revision: https://phabricator.services.mozilla.com/D126579

--HG--
extra : amend_source : f390dc67387ec358cf77b9b0825f42a706610f7f
2021-09-29 12:30:01 +03:00
Ben Campbell 54966cc799 Bug 1731170 - Fix memory leak in nsImapMailFolder::GetFolderOwnerUserName(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D126178

--HG--
extra : amend_source : 00f7c8dcd07a802c83e1c439e5d19091712d0359
2021-09-22 13:48:54 +03:00
Ben Campbell 920afd26df Bug 1668926 - Fix overlapping buffer in memory copy in nsImapNamespaceList::AllocateCanonicalFolderName(). r=mkmelin
Also:
- Moves the two Allocate*() member fns from public to private.
- Removes the unused GetFolderNameWithoutNamespace().
- Converts GenerateFullFolderNameWithDefaultNamespace() to return nsCString rather than char*, to fix a memory leak in nsImapService.

CID 1473469 Overlapping buffer in memory copy

Results in an undefined behavior

In nsImapNamespaceList::AllocateCanonicalFolderName(char const *, char): Buffers may be overlapping in a string copy function

Differential Revision: https://phabricator.services.mozilla.com/D125908

--HG--
extra : amend_source : 0e02849e42154d8d3e3ac9bcc61a902d2c6b8d81
2021-09-20 12:59:19 +03:00
Gene Smith 203ffb32c5 Bug 1708981 - Improve new mail detection for imap IDLE and non-Inbox folders. r=benc 2021-09-14 13:23:00 +03:00
Ben Campbell 792036556e Bug 1728924 - Remove nsIMsgParseMailMsgState.envelopePos. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D124438

--HG--
extra : amend_source : f6f2b30b86c94fd23886457ac36c7c9352325e75
2021-09-03 13:38:59 +03:00
Ben Campbell a55334b4ed Bug 1728703 - Remove redundant nsMsgDBFolder::GetOfflineMsgFolder(). r=mkmelin
Also removes getOfflineMsgFolder() from nsIMsgFolder as the only
implementation is internal to nsImapMailFolder.

Differential Revision: https://phabricator.services.mozilla.com/D124286

--HG--
extra : amend_source : 2568f722bbb0164c12aa45e06a79d3c9e8d896d0
2021-09-03 13:37:42 +03:00
Ben Campbell 72c2f9a280 Bug 1728495 - Remove unused srcFolder in nsCopyMessageStreamListener. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D124287

--HG--
extra : amend_source : 8e2c27b4fc768b8148e31b197a538fe511d7bda7
2021-09-03 13:36:55 +03:00
Ben Campbell 97a1cf2adf Bug 1728464 - Remove redundant message param in nsICopyMessageListener.beginCopy(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D124147

Depends on D124146

--HG--
extra : histedit_source : d956459fdedd438cc09806efefabfb0e81ee1413
2021-08-31 23:28:20 +00:00
Ben Campbell 264dd6d903 Bug 1728464 - Use more robust temp-file generation in nsImapMailFolder::BeginCopy(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D124146

--HG--
extra : histedit_source : 462b9ad47beaafa3836d0e3d08a80546a83d264c
2021-08-31 23:28:08 +00:00
Ben Campbell e62c604c96 Bug 1728495 - Remove unused nsISupport param in nsICopyMessageStreamListener.Init(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D124155

--HG--
extra : histedit_source : b2a1748be354a5e84d1f5c19a170716715aae51e
2021-09-01 04:09:30 +00:00
Ben Campbell 18cd382596 Bug 1727022 - Fix addSubFolder() use in test_listClosesDB.js. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D123309

--HG--
extra : histedit_source : 37b5f3277c3493afa550393fb6f258dbea84b8df
2021-08-27 05:42:12 +00:00
Ben Campbell d259f78052 Bug 1727467 - Some minor nsDependentCString fixups in nsImapHostSessionList. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D123907
2021-08-30 22:04:56 +00:00
Ben Campbell 0da4ff5cc3 Bug 1727467 - Use nsCString to store nsImapBodyShell folder name instead of allocating char buffer. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D123589

--HG--
extra : histedit_source : 018210b6ce29c09ab49a169c48e8f48406f412de
2021-08-29 21:52:23 +00:00
Ben Campbell 5becd6f79a Bug 1727875 - nsImapMailFolder::AddSubfolder() shouldn't destroy .onlineName. r=mkmelin
This patch just remove the offending line. It turns out the onlineName is
already set correctly by this time in AddSubfolder(). So it was redundant, as
well as wrong.
It appears the onlineName calculation is performed on-demand, in
GetDBFolderInfoAndDB().

Differential Revision: https://phabricator.services.mozilla.com/D123845

--HG--
extra : histedit_source : 032f6a77bcbae76fdbb20cc85e906a02ef8e5b49
2021-08-27 05:31:36 +00:00
Gene Smith 3a67c1626c Bug 163964 - Run initial folder discovery in own URL so messages open faster. r=benc 2021-08-25 13:59:51 -04:00
Ben Campbell beb00d6e0a Bug 1668926 - fix uninitialized fields in nsImapBodyShell ctor. r=mkmelin
CID 1473470 Uninitialized pointer field

The pointer field will point to an arbitrary memory location, any attempt to write may cause corruption.

In nsImapBodyShell::nsImapBodyShell(nsImapProtocol *, nsIMAPBodypartMessage *, unsigned int, unsigned int, char const *): A pointer field is not initialized in the constructor

Differential Revision: https://phabricator.services.mozilla.com/D123580
2021-08-25 03:08:54 +00:00
Ben Campbell e506c473c2 Bug 1668926 - fix Resource leak in nsImapServerResponseParser::namespace_data(). r=mkmelin
CID 450527 Resource leak

The system resource will not be reclaimed and reused, reducing the future availability of the resource.

In nsImapServerResponseParser::namespace_data(): Leak of memory or pointers to system resources

Differential Revision: https://phabricator.services.mozilla.com/D123574
2021-08-25 00:23:38 +00:00
Ben Campbell 3cca5ff130 Bug 1668926 - fix Dereference after null check in nsImapMockChannel::OnCacheEntryAvailable. r=mkmelin
CID 1478010 Dereference after null check

Either the check against null is unnecessary, or there may be a null pointer dereference.

In nsImapMockChannel::OnCacheEntryAvailable(nsICacheEntry *, bool, nsresult): Pointer is checked against null but then dereferenced anyway

Differential Revision: https://phabricator.services.mozilla.com/D123566
2021-08-25 00:10:32 +00:00
Ben Campbell c4f87ae30b Bug 1724849 - Tidy up nsMsgDBFolder::CreateDirectoryForFolder(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D123308

--HG--
extra : moz-landing-system : lando
2021-08-24 04:07:46 +00:00
Ben Campbell d7f1d74436 Bug 418551 - Convert nsFolderCache from mork (panacea.dat) to JSON. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D121493

--HG--
extra : histedit_source : 0c077e7dd257d14c7906eb0426531e6343c61c4f
2021-08-19 06:02:34 +00:00
Magnus Melin 9ea240eeda Backed out changeset 313d232c4038 (Bug 163964) for test failures. rs=backout
At least

 comm/mail/components/extensions/test/xpcshell/test_ext_accounts.js
 comm/mail/components/extensions/test/xpcshell/test_ext_folders.js
 comm/mailnews/imap/test/unit/test_imapHighWater.js
2021-08-23 16:54:15 +03:00
Gene Smith d2841c080c Bug 163964 - Run initial folder discovery in own URL so messages open faster. r=benc 2021-08-23 12:43:24 +03:00
Magnus Melin ba4277f631 Bug 1668926 - fix unused rv in nsImapProtocol::UploadMessageFromFile. r=benc
Coverify: CID 1468064 (#2 of 2): Unused value (UNUSED_VALUE)returned_value: Assigning value from this->SendData(")\r\n", false) to rv here, but that stored value is overwritten before it can be used

Differential Revision: https://phabricator.services.mozilla.com/D122699

--HG--
extra : rebase_source : dfa114bf776defd07d7ba7945d3e526ecdfe0c91
2021-08-15 21:45:47 +03:00
Magnus Melin 58a099eb8a Bug 1668926 - fix unused rv in nsImapMailFolder::CopyMessagesOffline. r=benc
CID 1473461 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from this->GetClearedOriginalOp(sourceOp.operator nsIMsgOfflineImapOperation *(), nsGetterAddRefs<nsIMsgOfflineImapOperation>(getter_AddRefs(originalOp)).operator nsIMsgOfflineImapOperation **(), nsGetterAddRefs<nsIMsgDatabase>(getter_AddRefs(originalDB)).operator nsIMsgDatabase **()) to rv here, but that stored value is overwritten before it can be used.

Differential Revision: https://phabricator.services.mozilla.com/D122700

--HG--
extra : rebase_source : f30f245755ee29e2403d83a8b7cd35ae630b6edb
2021-08-15 21:57:56 +03:00
Magnus Melin 40f8bb1d8d Bug 1668926 - fix unchecked return value in nsImapMailFolder::RenameLocal. r=benc
CID 1417617 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from this->CreateDirectoryForFolder(nsGetterAddRefs<nsIFile>(getter_AddRefs(dirFile)).operator nsIFile **()) to rv here, but that stored value is overwritten before it can be used.

In nsImapMailFolder::​RenameLocal(nsTSubstring<char> const &, nsIMsgFolder *): A value assigned to a variable is never used.

Differential Revision: https://phabricator.services.mozilla.com/D122706

--HG--
extra : rebase_source : 38ceb5643bbf410f0c41cf272c6373daec820870
2021-08-15 22:52:00 +03:00
Magnus Melin 38b317a01f Bug 1668926 - fix unused return value in nsImapMailFolder::FillInFolderProps. r=benc
CID 1364639 (#1 of 1): Unused value (UNUSED_VALUE)returned_value: Assigning value from bundle->FormatStringFromName("imapOtherUsersFolderTypeDescription", params, folderTypeDesc) to rv here, but that stored value is overwritten before it can be used.

Differential Revision: https://phabricator.services.mozilla.com/D122707

--HG--
extra : rebase_source : 719cc8af472f1ecadc6a83a4ae75c53b96a9a8fe
2021-08-15 23:06:36 +03:00
Rob Lemley 14320fcf03 Bug 1712986 - Port bug 1712971: Authentication code updates. r=darktrojan
Differential Revision: https://phabricator.services.mozilla.com/D116031
2021-05-26 23:40:33 +00:00
Ben Campbell 905a42dc04 Bug 1719996 - Remove nsImapService assumption that message output stream is seekable. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D119941

--HG--
extra : histedit_source : 42a679133b86a3796ab5d36715a8546b32fe2566
2021-07-15 04:49:20 +00:00
Ben Campbell 72229ac0b4 Bug 1719996 - Remove nsImapMailFolder assumption that message output stream is seekable. r=mkmelin
This removes an nsIMsgHdr.setMessageOffset() call. That call was redundant - it's handled
already inside the mbox mailstore.

Differential Revision: https://phabricator.services.mozilla.com/D119940

--HG--
extra : histedit_source : 8d917c9bd73f2d26e1dc90d6d2cc14e098204e3a
2021-07-15 04:49:07 +00:00
Ben Campbell 43432e28fe Bug 1718998 - Comment-only patch. Notes on folder copying in IMAP. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D119034

--HG--
extra : moz-landing-system : lando
2021-07-05 10:12:09 +00:00
Gene Smith e73c3e2368 Bug 1682370 - fix a memory leak as a follow-up to STARTTLS response changes. r=benc 2021-06-28 13:31:09 +03:00
Gene Smith ea1278fae6 Bug 1682370 - Discard/ignore IMAP lines received before before STARTTLS response. r=benc
--HG--
extra : amend_source : aa209c6e2e49f8306ab1aef9b0f741a4df3184e3
extra : histedit_source : 2b2b5d506fd0e99788ebf7901bb19fbd8682b02e
2021-06-14 22:38:12 -04:00
Rob Lemley e6b3059ecd Backed out changeset 9c6e83848221 (bug 1682370) for Windows build failures. r=backout a=rjl 2021-06-17 19:48:34 -04:00
Gene Smith de872baf69 Bug 1682370 - Discard/ignore IMAP lines received before before STARTTLS response. r=benc 2021-06-14 22:38:12 -04:00
Ben Campbell f5d26bc87d Bug 1643208 - Rename nsIMsgCopyService.copyFolders() to nsIMsgCopyService.copyFolder(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D117610

--HG--
extra : amend_source : c472b294931c52b86acfec6734a8b9e7a615f874
2021-06-15 16:59:21 +03:00
Ben Campbell 660ed07b28 Bug 1715433 - Use initial-lowercase-letter naming convention in nsIMsgCopyService. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D117256

--HG--
extra : amend_source : 9466d9ce3ff06bc5a7ca014c514d70e023b421b4
2021-06-09 12:57:51 +03:00
Geoff Lankow 60a1660d4d Backed out changeset 805cd9bba5f6 (bug 1712986) due to bug 1705659 backout.
Also this landed with the wrong m-c bug number in the commit message.
2021-06-01 15:57:37 +12:00
Rob Lemley 5d02b8c220 Bug 1712986 - Port bug 1712971: Authentication code updates. r=darktrojan
Differential Revision: https://phabricator.services.mozilla.com/D116031
2021-05-26 23:40:33 +00:00
Ben Campbell a1020954d6 Bug 1712025 - Tidy up an oddly-named variable in nsImapIncomingServer::PossibleImapMail(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D115559

--HG--
extra : amend_source : 4483a723e379adc5b4ae66a530f0989b6fc36383
2021-05-20 08:58:20 +03:00
Magnus Melin a508668de2 Bug 1711670 - Port bug 1711078 to Thunderbird - Mark immutable nsIPrincipal fields as `const`. rs=bustage-fix DONTBUILD
Port of https://hg.mozilla.org/mozilla-central/rev/f8e166c5eb17

Differential Revision: https://phabricator.services.mozilla.com/D115354

--HG--
extra : amend_source : f1229691a118a45e3963aed8b3d543075f8c6cb2
2021-05-18 15:48:47 +03:00
Ben Campbell 1df0227998 Bug 1706387 - Make sure all mailnews nsIChannel implementations have loadInfo set. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D114911

--HG--
extra : amend_source : 0c3e551b1396d6cef6f9c84b58ca9d9553c29434
2021-05-12 13:26:20 +03:00
Magnus Melin 1a43a2fbe7 Bug 1694662 - adjust Thunderbird tests for changes in 1694662. rs=bustage-fix
--HG--
extra : amend_source : b73906c53e95d5f0b889012182f57964826e90f1
2021-05-01 13:54:55 +03:00
Magnus Melin d12e06b2f5 Bug 1694662 - Port "Remove HTTP cache backing for AppCache" to Thunderbird. rs=bustage-fix
--HG--
extra : rebase_source : bfb3884feb85457f6a79dab0de2013ba3a3f05fd
2021-04-30 21:51:46 +03:00
Gene Smith 5c2abe79ee Bug 1705765 - Fix regression to allow creation and rename of imap folders containing ascii ampersand. r=benc 2021-04-22 12:57:31 +03:00
Gene Smith 5384dd39ad Bug 1690093 - Allow imap APPEND of folder to not yet authenticated account. r=BenB
--HG--
extra : histedit_source : d396bcfc2a8ff734571f22606e6633ff03d99282
2021-04-15 17:15:38 -04:00
Ben Campbell aff1f4853d Bug 1692919 - Remove leftover nsIArray helper BuildIdsAndKeyArray2() in nsImapMailFolder. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D112899

--HG--
extra : amend_source : d9b7a3e6d80618a11a259fd7886ff97707c1065b
2021-04-21 12:46:24 +03:00
Ben Campbell 5515c6f131 Bug 1704471 - Have nsISubscribableServer.getChildURIs() return an array rather than an enumerator. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D112134

Depends on D112129
2021-04-15 21:53:57 +00:00
Magnus Melin f0da37f65c Bug 1668926 - fix for "Using uninitialized value flagOperation" in nsImapOfflineSync::ProcessFlagOperation. r=benc
CID 450452 (#1 of 1): Uninitialized scalar variable (UNINIT)5. uninit_use: Using uninitialized value flagOperation

Differential Revision: https://phabricator.services.mozilla.com/D111613

--HG--
extra : rebase_source : 466bf728667444f7d14e4aa058a85480db0416c1
2021-04-11 15:11:58 +03:00
Magnus Melin 8e10e7e2ed Bug 1668926 - fix "Using uninitialized value newFlags" issue in nsImapOfflineSync::ProcessFlagOperation. r=benc
CID 451007 (#1 of 1): Uninitialized scalar variable (UNINIT)6. uninit_use: Using uninitialized value newFlags.

Differential Revision: https://phabricator.services.mozilla.com/D111612

--HG--
extra : rebase_source : d01d64854d851952d88499c2febc873a3e4bc739
2021-04-11 14:54:30 +03:00
Magnus Melin 344a5435fc Bug 1668926 - fix null pointer dereference in nsIMAPBodypartLeaf::ShouldFetchInline. r=benc
CID 1473460 (#1 of 1): Dereference before null check (REVERSE_INULL)check_after_deref: Null-checking this->m_parentPart suggests that it may be null, but it has already been dereferenced on all paths leading to the check

Differential Revision: https://phabricator.services.mozilla.com/D111618

--HG--
extra : rebase_source : 07c9056f9ce8c08784e0596d5b912a824583fa9f
2021-04-11 20:19:01 +03:00
Magnus Melin 4f24274521 Bug 1668926 - fix uninitialized members in nsImapBodyShell::nsImapBodyShell. r=benc
uninit_member: Non-static class member m_folderName is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member m_showAttachmentsInline is not initialized in this constructor nor in any functions that it calls.

CID 1473470 (#3 of 3): Uninitialized scalar field (UNINIT_CTOR)9. uninit_member: Non-static class member m_contentModified is not initialized in this constructor nor in any functions that it calls.

Differential Revision: https://phabricator.services.mozilla.com/D111614

--HG--
extra : rebase_source : d4dab1f651879fb486573ee5b1348b82c884702c
2021-04-11 15:51:15 +03:00
Martin Giger 69907a5a50 Bug 1696659 - Replace uses of OS.* with IOUtils and friends. r=mkmelin
Except for chat's logger.jsm (and test), ext-compose.js (no IOUtils in extension API implementations)
and converterWorker (uses OS.File.open to read and write big files).

Differential Revision: https://phabricator.services.mozilla.com/D111298

--HG--
extra : moz-landing-system : lando
2021-04-12 22:54:06 +00:00
Magnus Melin b02c872895 Bug 1678109 - get rid of the mailnews IOUtils.jsm module. r=freaktechnik
Differential Revision: https://phabricator.services.mozilla.com/D108933

--HG--
extra : rebase_source : d8bd49f8dd04b4b142c9975fe18a422da89587e9
2021-03-18 14:28:05 +02:00
Magnus Melin 40f55a133b Bug 1518536 - remove most of iteratorUtils.jsm usage. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D109083

--HG--
extra : rebase_source : 6baaec6ef5e4918ca1ff76b16b8ed8d8b034cce9
2021-03-24 12:49:43 +02:00
Ben Campbell 1521d401a3 Bug 1602326 - Tidy up error handling for callers of nsIMsgFolder.getOfflineFileStream(). r=mkmelin
Biggest churn is in nsImapMockChannel::ReadFromLocalCache() - this patch
switches it to use NS_ENSURE_SUCCESS() early-outs rather than big nested
if (NS_SUCCEEDED(rv))... clauses.
2021-03-12 12:50:34 +02:00
Ben Campbell 39fe2d503a Bug 1697658 - Port bug 1634281 - Replace nsDataHashtable with nsTHashMap. rs=bustage-fix r=darktrojan
Differential Revision: https://phabricator.services.mozilla.com/D107951

--HG--
extra : moz-landing-system : lando
2021-03-11 00:46:30 +00:00
Ben Campbell 667c7ade15 Bug 1602326 - Make sure nsIMsgFolder.getOfflineFileStream() returns a stream or an error code. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D107308

--HG--
extra : moz-landing-system : lando
2021-03-10 09:44:06 +00:00
Emilio Cobos Álvarez dd6e002e7b Bug 1696776 - Plumb failed security info around from the smtp service, so that the dialog actually has the right cert. r=rnons 2021-03-07 01:20:45 +01:00
Magnus Melin 778c608f67 Bug 1695274 - followup - clang-format. rs=clang-format 2021-03-01 18:59:57 +02:00
Rob Lemley c39dd2bbb3 Bug 1695274 - Port bug 1691913: More bustage fixes. rs=bustage-fix
--HG--
extra : amend_source : 76bee10b881e1d858bcc30cb4aa7e20ffc20dc43
extra : histedit_source : 505498ff88f4d21ac2db51db7abad5bbe3f6a4df
2021-02-26 16:11:08 -05:00
Alessandro Castellani 98b717ed89 Bug 1695274 - Port bug 1691913: Rename nsBaseHashtable::Put to InsertOrUpdate. r=mkmelin
--HG--
extra : histedit_source : 41e749b241430122b5e877122194dbc6cf018b73
2021-02-26 10:23:03 -08:00
Richard Marti 79757af9de Bug 1695274 - Port bug 1691913: Rename nsBaseHashtable::Put to InsertOrUpdate. r=aleca,rjl
--HG--
extra : histedit_source : 01dc507d9c91c23ca95f6b1624deecb1bf9c908f
2021-02-26 18:26:46 +01:00
Ben Campbell 0169d0e2e3 Bug 1682942 - Replace nsISimpleEnumerator message enumeration in nsIMsgDBView, nsIMsgFolder and nsIMsgDatabase. r=mkmelin
Added an equivalent class - nsIMsgEnumerator - which still has the same
getNext()/hasMoreElements() methods as nsISimpleEnumerator. However, this new
getNext() returns nsIMsgHdr objects directly, rather than nsISupports, so
callers don't have to jump through extra QI hoops.
2021-02-26 12:41:47 +02:00
Henry Wilkes e5bf5649cf Bug 1667338 - Switch url from out parameter to return value in nsIMsgMessageService.GetUrlForUri. r=mkmelin
A return value is more convenient for calling in javascript.

Also renamed interface definition from GetUrlForUri to getUrlForUri to conform to javascript naming conventions.

Differential Revision: https://phabricator.services.mozilla.com/D106271

--HG--
extra : amend_source : 7ff0c6889942d16dff1e87c25c1d04b195373f64
2021-02-26 12:34:20 +02:00
Ben Campbell d12d30fb7e Bug 1682942 - Use JS iterable protocol instead of nsISimpleEnumerator for nsIMsgDatabase.EnumerateMessages() calls. r=mkmelin 2021-02-19 11:00:03 +13:00
Geoff Lankow 7b9a707751 Port bug 1678255 - Add new argument to nsIExternalProtocolService.LoadURI calls. rs=bustage-fix 2021-02-23 17:51:20 +13:00
ISHIKAWA, Chiaki 1db1b0f3a1 Bug 1596036: Check GetOfflineFileStream() return value always first. r=benc 2021-02-22 22:35:57 +13:00
Magnus Melin 4347b17567 Bug 1692610 - follow-up to clang format. rs=clang-format
Also from some other bugs...
2021-02-21 12:49:43 +02:00
Ben Campbell db2a48bb1e Bug 1692919 - Remove leftover MsgGetHeadersFromKeys2() helper (added for Bug 1583030). r=mkmelin 2021-02-17 13:02:31 +02:00
Ben Campbell 5afc64da10 Bug 1682941 - Remove nsISimpleEnumerator from nsIMsgFolder.subFolders property. r=mkmelin 2021-02-12 21:31:17 +13:00
Rob Lemley c9a297627a Bug 1692610 - Port bug 1690615: Update calls to createTransport. rs=bustage-fix
--HG--
extra : rebase_source : bfff07ef55fb0cf177456f2983aba693127c54ee
2021-02-12 17:54:17 -05:00
Ben Campbell a3199d0143 Bug 1664572 - Remove cruft in nsImapIncomingServer::DeleteNonVerifiedFolders(). r=mkmelin 2021-02-12 22:29:57 +02:00
Gene Smith edc13af1e3 Bug 1688782 - Change encoding from MUTF-7 to UTF-8 if necessary when running EnsureExists URL. r=benc 2021-02-01 16:03:07 -05:00
Geoff Lankow 77781cf2b4 Bug 1687847 - Set nsIChannel::DISPOSITION_ATTACHMENT on newsgroup attachments too. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D103733

--HG--
extra : amend_source : 03347e53d031693bf0e94694cdd24f079c0deef3
2021-02-02 12:30:58 +02:00
Gene Smith 07a99d0475 Bug 1618455 - Change the imap append timeout from hardcoded 20s to 1/5th of mailnews.tcptimeout. r=mkmelin 2021-02-02 12:28:05 +02:00
Klaus B 0a6f9184ed Bug 1687727 - Fixes to IMAP folder name encoding. r=benc
Fix code issues from bug 1571672 (rev. 0054ea73e658).
Fixed trash folder selection of folder with non-ASCII name on server without UTF8=ACCEPT capability.
Introduce nsIMsgImapMailFolder.shouldUseUtf8FolderName and use where needed.
Replace heuristic in am-server.js.
Remove or correct comments related to MUTF-7/UTF-8.
2021-01-25 12:55:15 +02:00
Klaus B 3a87589a7b Bug 1687727 - Unify spelling of UTF-8 and MUTF-7 in IMAP code. r=benc 2021-01-25 12:54:35 +02:00
Geoff Lankow aa3f56a5df Bug 1687847 - Set nsIChannel::DISPOSITION_ATTACHMENT on attachments so they open when expected. r=mkmelin
The presence of this flag forces a docShell to pass loading onto the external helper app service. In some special cases we don't want this, so I've white-listed certain content types.

Differential Revision: https://phabricator.services.mozilla.com/D102892

--HG--
extra : moz-landing-system : lando
2021-01-25 09:19:28 +00:00
Klaus B b3bfd88458 Bug 1580262 - Move assigning null byte. r=benc 2021-01-25 14:37:31 +13:00
Klaus B. bf56e5a82c Bug 1580262 - Fix off by one in nsImapUrl::unescapeSlashes. r=mkmelin,emilio 2021-01-24 00:43:41 +01:00
Klaus B 5e2a193b81 Bug 1580262 - Add a more robust nsImapUrl::UnescapeSlashes(). r=mkmelin 2021-01-23 12:48:12 +02:00