Unable to fix corrupted MS-Exchange message if opened from a saved local file
Categories
(MailNews Core :: Security: OpenPGP, defect, P2)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: aleca, Assigned: aleca)
Details
Attachments
(1 file, 1 obsolete file)
4.30 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
If a locally saved corrupted MS-Exchange is opened via File > Open > Saved Message...
the console throws this error when clicking on the Repair message
button.
JavaScript error: chrome://openpgp/content/modules/fixExchangeMsg.jsm, line 38: TypeError: can't access property "getUriForMsg", hdr.folder is null
A temporary workaround is for the user to copy this message inside a folder in TB (Archive, Inbox, etc.)
Comment 2•4 years ago
|
||
The repair assumes a folder, which it then writes back to as well. Since there's no folder for a message opened from file, it can't work (without significant rewriting to do something almost completely different.)
Comment 3•4 years ago
|
||
It might be sufficient to introduce a better error message - tell the user we cannot repair files opened this way and instruct to copy.
Assignee | ||
Comment 4•4 years ago
|
||
I can take care of this, so I can also update the test to cover this scenario and prevent the JS error.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
This patch prevents the repair issue altogether by detecting if the message is inside a folder or not.
If not, we return a notification with the proper information for a successful repair.
No need to run the repair if we already know will fail.
Since there are some strings changes, we should probably not uplift this to 78, which I guess is fine since this is not a super sever issue and we didn't have any report of it so far.
Comment 6•4 years ago
|
||
Comment on attachment 9186118 [details] [diff] [review] 1674013-broken-exchange.diff Review of attachment 9186118 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/locales/en-US/messenger/openpgp/openpgp-frontend.ftl @@ +34,5 @@ > openpgp-search-signature-key = > .label = Discover… > > # Don't translate the terms "OpenPGP" and "MS-Exchange" > +openpgp-broken-exchange-opened = This is an OpenPGP message that was apparently corrupted by MS-Exchange and opened from a local file. Copy the message inside a folder by using the Menu item "Message > Copy to" if you want to try an automatic repair. We should avoid giving instructions on which menu patch to take, as that could easily change over time. What we usually do when we know the action can't be done, is we just disable the button. I think that could be reasonable for this case as well. ::: mail/locales/en-US/messenger/openpgp/openpgp.ftl @@ +576,2 @@ > failed-decrypt = Error - decryption failed > +fix-broken-exchange-msg-failed = Unable to repair the selected message. Usually l10n key should be updated, but I guess this just improves the language and doesn't change the message. But "selected message" is a bit weird. How about "Could not repair this message." or "Repairing this message did not work."
Assignee | ||
Comment 7•4 years ago
•
|
||
What about "Unable to repair this message."
?
I think it's better to keep a simple present verb instead of Could
or Repairing...did not
.
We should avoid giving instructions on which menu patch to take, as that could easily change over time.
What we usually do when we know the action can't be done, is we just disable the button. I think that could be reasonable for this case as well.
Sure, but I think we should let the user know why we can't repair it and avoid a dead-end interaction.
What about this?
"This is an OpenPGP message that was apparently corrupted by MS-Exchange and it can't be repaired because it was opened from a local file. Copy the message into a mail folder to try an automatic repair."
Assignee | ||
Comment 8•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/90eb59ff31f2
Improve message feedback when trying to fix corrupted MS-Exchange of opened local files. r=mkmelin
Description
•