Open Bug 1677088 Opened 4 years ago Updated 1 year ago

remove compat.jsm and other basically unused or unneeded former enigmail modules

Categories

(MailNews Core :: Security: OpenPGP, task)

Tracking

(thunderbird_esr78 wontfix)

ASSIGNED
89 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: mkmelin, Assigned: mkmelin)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open)

Attachments

(31 files)

(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details

https://searchfox.org/comm-central/rev/47359f1d9b32d1f35c969409511309d8f4762b63/mail/extensions/openpgp/content/modules/compat.jsm

This doesn't seem to do anything useful. All the services can be called directly, and the tree stuff is for old versions of Thunderbird.

Assignee: nobody → mkmelin+mozilla
Summary: remove enigmail compat.jsm → remove compat.jsm and other basically unused former enigmail modules

Replace EnigmailCompat.generateQI with ChromeUtils.generateQI

find mail -type f -not -path ".hg/" -regex ".*.(jsm|js)$" -exec sed -i -E 's/EnigmailCompat.generateQI/ChromeUtils.generateQI/g' {} ;

Delete lazy import lines

find mail -type f -not -path ".hg/" -regex ".*.(jsm|js)$" -exec sed -i -E '/EnigmailCompat: "chrome://openpgp/content/modules/compat.jsm"/d' {} ;

EnigmailCompat.copyFileToMailFolder -> MailServices.copy.CopyFileMessage

+ then manually adjust the arguments

find mail -type f -not -path ".hg/" -regex ".*.(jsm|js)$" -exec sed -i -E 's/EnigmailCompat.copyFileToMailFolder/MailServices.copy.CopyFileMessage/g' {} ;

EnigmailCompat.getUrlFromUriSpec: move this function to EnigmailFuncs, mail/extensions/openpgp/content/modules/funcs.jsm

find mail -type f -not -path ".hg/" -regex ".*.(jsm|js)$" -exec sed -i -E 's/EnigmailCompat.getUrlFromUriSpec/EnigmailFuncs.getUrlFromUriSpec/g' {} ;

EnigmailCompat.getExistingFolder -> MailUtils.getExistingFolder

find mail -type f -not -path ".hg/" -regex ".*.(jsm|js)$" -exec sed -i -E 's/EnigmailCompat.getExistingFolder/MailUtils.getExistingFolder/g' {} ;

getTreeCompatibleFuncs: manually change to operate on the tree and not on the functs (which just wrapped the functions)

FeedUtils had copy of the same functionality. Perhaps the function should be moved somewhere else, but we're not even hooking up the keyserver atm so it's for the moment unused code.

Status: NEW → ASSIGNED
Keywords: leave-open
Target Milestone: --- → 89 Branch
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/9dfed969aa03 remove unused socks5Proxy.jsm. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/bff7b0d79ad4 remove enigmail compat.jsm. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/003725015964 remove xhrUtils.jsm. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/429e8371e786 remove unused mail/extensions/openpgp/content/modules/addrbook.jsm. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/b99806ebe6dc remove unused mail/extensions/openpgp/content/modules/autoSetup.jsm. r=PatrickBrunschwig
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/170bd65d2093 remove unused mail/extensions/openpgp/content/modules/configBackup.jsm. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/9978d549ed99 remove mail/extensions/openpgp/content/modules/configure.jsm which doesn't do anything. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/1cf448c6e178 remove mail/extensions/openpgp/content/modules/app.jsm. r=PatrickBrunschwig

We're not using anything from the enigmail.properties file, since everything was converted to Fluent.
Inlining the strings now so we know what they were, in case some of them are needed in the future.

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/3cae048e6dfb remove EngimailLocale - mail/extensions/openpgp/content/modules/locale.jsm. r=PatrickBrunschwig
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/41ef5743e159 clean out most of the globals from enigmailCommon.js. r=PatrickBrunschwig
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f0174708d594 remove EnigmailPrefs. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/d417ebc52419 remove EnigmailTime. r=PatrickBrunschwig
Summary: remove compat.jsm and other basically unused former enigmail modules → remove compat.jsm and other basically unused or unneeded former enigmail modules
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f5c2785a9c8c remove EngmailOS. r=PatrickBrunschwig

I assume this was used for something more at some point in the past. At the moment, it doesn't appear to do much.
Nothing was every pushed to createdURIs.

For the buggy exchange message, it appears we always just display blank now until we can decrypt. The message that (maybe?) was intended to show, I don't see ever getting accessed.

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/cb7f881249d4 remove EnigmailProtocolHandler. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/9a5cb3c312a4 remove EnigmailRNG (rng.jsm). r=PatrickBrunschwig
Regressions: 1706918

Depends on D127942

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/5b21121bd4bb remove unused EnigmailDialog.longAlert. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/41c84577b76f remove EnigmailDialog.promptValue. r=PatrickBrunschwig

Remove temp dir handling (temp dir must always exist), and also a few other methods never used anymore.

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/46e8fd271da4 remove EngimailFiles tempdir handling. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/83bf1a13c865 remove EnigmailCommandLine. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/1e6945cf19f2 clean out unused things from EnigmailCore.jsm. r=PatrickBrunschwig
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/2cf27c5269cc remove EnigmailStdlib. r=PatrickBrunschwig

Only use in uncommented code...

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/56660aed4ff5 remove EnigmailAttachment. r=PatrickBrunschwig

This makes the cases that were already in async contexts use normal async/await instead,
and makes some easy-to-convert functions to async as well.

Remaining cases are harder and may each require more work.

It's possible Thunderbird should also have some functionality to remind about expiring keys, but I don't think this would be it.
I don't understand why the recommendation has been to create a new key. Wouldn't it be better to extend the validity?

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/a3092558b8b8 use the Clipboard API instead of EnigmailClipboard. r=PatrickBrunschwig
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/efac1b46face remove unused EnigmailKeyUsability. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/872c8a9e3b02 remove the "easy" cases of capi.sync() calls from openpgp code. r=PatrickBrunschwig

Inlined and slight cleaned up into the one uncommnented (and very broken) use case...

Removing EnigmailFiles required making more functions async, so fixing it rippled a bit.

Making things async changed some timings slightly, which caused some test failures.
I located and fixed a few such problems, where async methods were not properly awaited.

Depends on D133947

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/f1af77be5c05 remove EnigmailSend. r=PatrickBrunschwig https://hg.mozilla.org/comm-central/rev/d7dc20e53bb8 convert EnigmailFiles to using IOUtils. r=PatrickBrunschwig

Removed the whenDoneDB param and made proper use of the functions being async instead.
Fixes some minor buggy behavior as well.

Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/ad7f3cd2911e fix KeyLookupHelper async functionality. r=PatrickBrunschwig
Regressions: 1748918
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/332dc778c1ce remove pointless comment. rs=me
Regressions: 1763258
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/27993795da6f remove unused EnigmailGgp. r=PatrickBrunschwig
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/5d8d79df8659 remove/inline enigmailMsgComposeHelper.js. r=PatrickBrunschwig

(In reply to Magnus Melin [:mkmelin] from comment #40)

Created attachment 9255584 [details]
Bug 1677088 - convert EnigmailFiles to using IOUtils. r=PatrickBrunschwig

This patch introduced (at least) regression bug 1778509.

Code that previously used binary file reading, and that expected to handle binary files, was converted to use readUTF8.

Regressions: 1778509
Regressions: 1780123

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/1a1d2a8fd6ff
Remove some dead code in EnigmailMime. r=kaie

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: