Review EnigmailLog.data/getLogData and EnigmailConsole
Categories
(MailNews Core :: Security: OpenPGP, task, P2)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: standard8, Assigned: mkmelin)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1664665 - remove mail/extensions/openpgp/content/modules/searchCallback.jsm. r=PatrickBrunschwig
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
In looking through some of the Enigmail code that gets run on startup, I noticed that EnigmailLog.data
(in log.jsm
) gets initialised as an array, and appended to for every call to log a message (including processing the date object).
It is limited to 2500 messages, which is about ~350kb according to my about:memory.
It seems EnigmailLog.data
was intended to be used by getLogData
, but that doesn't appear to be used anywhere:
https://searchfox.org/comm-central/search?q=getLogData&path=&case=false®exp=false
Should getLogData
and EnigmailLog.data
be dropped now?
Additionally, EnigmailConsole seems to be doing something similar, but with a string pipe that's limited to 32768 characters.
I think that EnigmailConsole data can be displayed on an about page, but I don't see how to get to it from within Thunderbird at the moment:
Longer term, it might be good to review Enigmail's logging and look to replace it with console.createInstance
which creates a specific console instance and behaves like a normal console (this is based off Console.jsm).
Kaie/Patrick, could you advise please on what we need to keep or can get rid of for EnigmailLog/EnigmailConsole?
Comment 1•4 years ago
|
||
In Enigmail, there is a dialog that allows you to display the log and save it to a file.
The console was used to display the command line calls of gpg.
But both dialogs don't exist in Thunderbird, and gpg is not called directly anymore.
Therefore, EnigmailConsole can certainly be removed entirely.
EnigmailLog is still partially in use. If you set
- the pref "temp.openpgp.logDirectory" to a valid directory, and
- the env var NSPR_LOG_MODULES=enigmail.js:5
then you'll get a log file with all EnigmailLog.DEBUG() entries.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D111369
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
This error handling is just small local methods. Moving it there means less complexity and more readability.
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5ad8257d3c02
Remove EnigmailConsole. r=PatrickBrunschwig
https://hg.mozilla.org/comm-central/rev/438b02477534
Remove EnigmailLog.data/getLogData. r=PatrickBrunschwig
https://hg.mozilla.org/comm-central/rev/cede723c0d99
remove mail/extensions/openpgp/content/modules/searchCallback.jsm. r=PatrickBrunschwig
https://hg.mozilla.org/comm-central/rev/7ba95d2d89a7
remove/inline mail/extensions/openpgp/content/modules/errorHandling.jsm. r=PatrickBrunschwig
Description
•