Closed Bug 1985610 Opened 5 months ago Closed 5 months ago

delete attachment from openpgp message not properly prevented when using the delete key

Categories

(Thunderbird :: General, defect)

Thunderbird 142
defect

Tracking

(thunderbird_esr140 wontfix, thunderbird144 fixed)

RESOLVED FIXED
145 Branch
Tracking Status
thunderbird_esr140 --- wontfix
thunderbird144 --- fixed

People

(Reporter: h.judt, Assigned: mkmelin)

References

Details

Attachments

(5 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0

Steps to reproduce:

  1. Open a received mail that has multiple attachments.
  2. Select more than one attachment or all of them.
  3. Delete them (either with keyboard del or via context menu).

Actual results:

None of the selected attachments are deleted. Selecting and deleting only a single attachment works, though. The "Detach" attachment functionality suffers a similar problem.

Expected results:

All selected attachments should have been deleted.

Is this an IMAP account? If so maybe bug 1980776, but likely not as you say delete single attachment works for you.

Tried Help | Troubleshoot mode?

Or what symptoms do you get? Do you get anything relevant in the Error Console? (Ctrl+Shift+J)

Component: Untriaged → General

It happens both with IMAP and local accounts. Nothing to see in error console.

You select the files, then it asks "The following files will be deleted: <only-first-file>", then after clicking on OK nothing happens, files still exist.

Same behaviour observed in troubleshooting mode.

To reproduce this I simply created a new mail, attaching a few files.

Now additionally - but this might be a separate bug? - I tried deleting the attachments from the copy in the (local) "Sent" folder. More weirdness: When I try to delete the attachments from this copy in sent, it seemed to delete the contents of the mail. No attachments anymore, not even those that I did not select, not mail text.

When viewing the source code of the copy in "Sent", all data is still there (including all attachments). It just isn't being displayed (except header information).

Re <only-the-first>, see bug 1985712.

For the other issues, idk what's going on. Try Repair Folder for the Sent folder.

Ok, thanks anyway. "Repair Folder" did not help. I can delete one or many attachments while still creating a mail, before sending it. I can't when opening a received one. Maybe the solution to bug 1985712 also solves this.

Hm. No, unfortunately it does not. I have added the patch here and it only fixes the question in the dialog:
https://hg-edge.mozilla.org/comm-central/rev/b3b6af514436

Please attach one of the messages you can reproduce the issue with, as .eml

Attached file test-sent.eml

mail sent, saved to eml from sent folders.

mail saved to eml from sent folders after trying to delete multiple attachments. the contents are no longer displayed in the preview pane or when opening it in a new tab.

Attached file test-received.eml

mail received in imap inbox saved to eml. note that the previously mentioned sent folder is a local folder, not an imap folder.

mail from inbox saved to eml after deleting attachments. its contents are no longer shown, too.

BTW, when looking at the file revision, I noticed there has been quite some rework:
https://hg-edge.mozilla.org/comm-central/rev/11b1e55cae56266d38dbd16371cfae3bf5febd78
It seems that attachment handling was rewritten...

Yes it was essentially rewritten in bug 1788159.

Your sample message is OpenPGP signed. We don't allow delete/detach for those. See bug 288700.

The context (and other) menus to delete/detach are properly disabled - but I do notice we're not preventing the Delete key from acting on them.

Yes it was essentially rewritten in bug 1788159.

Your sample message is OpenPGP signed. We don't allow delete/detach for those. See bug 288700.

The context (and other) menus to delete/detach are properly disabled - but I do notice we're not preventing the Delete key from acting on them.

Just making hitting Delete on an attachment do nothing.
If I disabled the command, Delete would try next controller => message deleted while the focus was on the attachment.

Assignee: nobody → mkmelin+mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Yes, if I disable gpg signing, then deleting works as expected (I have tested this with the patch that fixes the dialog question).

Does this mean that whenever I get a message from someone who answers one of my signed mails, attaching files, even if he/she does not sign it, I will not be able to delete attachments?

It's only disabled for the actual message being signed and/or encrypted. (As detach will obviously invalidate signature. The special mime structure would also need to be handled differently, as you saw - it's not working.)

It's only disabled for the actual message being signed and/or encrypted. (As detach will obviously invalidate signature. The special mime structure would also need to be handled differently, as you saw - it's not working.)

See Also: → 288700
Summary: Deleting more than one attachment at once does not work anymore → delete attachment from openpgp message not properly prevented when using the delete key
Attachment #9512506 - Attachment description: Bug 1985610 - Disable Delete key from deleting signed/encrypted emails. r=#thunderbird-reviewers → Bug 1985610 - Disable Delete key from deleting signed/encrypted emails. r=babolivier
Target Milestone: --- → 145 Branch

Pushed by edicharry@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/99e3433eb305
Disable Delete key from deleting signed/encrypted emails. r=babolivier

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED

Comment on attachment 9512506 [details]
Bug 1985610 - Disable Delete key from deleting signed/encrypted emails. r=babolivier

Uplift Approval Request

  • Please state case for uplift consideration and ensure bug severity is set: Erroneous functionality
  • User impact if declined: Confusion about why delete wouldn't work, when it was supposed to be disabled in the first place.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Daily?: Yes
  • Has the fix been verified in Beta?: No
  • Needs manual test from QA?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Confined change
  • Does the fix cause any migrations to be skipped?: No
  • String changes made/needed: none
Attachment #9512506 - Flags: approval-comm-beta?

Comment on attachment 9512506 [details]
Bug 1985610 - Disable Delete key from deleting signed/encrypted emails. r=babolivier

[Triage Comment]
Approved for beta

Attachment #9512506 - Flags: approval-comm-beta? → approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: