The last draft state of the message will stay in the "Drafts" folder of the first account.
When you switch the account, the draft is moved from the first account to the account you switched to. Thus when you send the mail, no draft version is left.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Oh yes, we need to send the draft account ID and draft folder ID to the server as well. Right now we send just one account and folder ID and assume it's both valid for the draft and the new draft or sent message. In this case this assumption is wrong.
Hello, my name is Jennifer. I am a student in University of Michigan AnnArbor. I would like to know if this issue is still open and if I can try to fix this issue for a project in class.
@OhanaM yes, the issue is waiting for someone to pick it up, so your contribution would be very welcome! :) Let us know if you need any help setting the development environment up, the documentation for that is at https://docs.nextcloud.com/server/latest/developer_manual/general/devenv.html
I looked over the code and here is my understanding of the issue: since saveDraft is an action that happens every time the user stop typing for some interval, when the user switches account, the old draft, since the program already called saveDraft earlier, will remain in the server, which causes the described behavior.
I was thinking since it is only sending one accountID to the server, can we link "check if draft exists, yes then delete existing draft" to the action of account switch? Will this behavior causes too much overhead and/or create a CVE
I was thinking since it is only sending one accountID to the server, can we link "check if draft exists, yes then delete existing draft" to the action of account switch?
Yep, something like that is needed. We send the old draft UID, but to the new account. So that won't match anything sensible. In most cases nothing will be deleted, in the worst case it deletes an unrelated draft from the newly selected account.
Will this behavior causes too much overhead and/or create a CVE
CVE?
Most helpful comment
Hello, my name is Jennifer. I am a student in University of Michigan AnnArbor. I would like to know if this issue is still open and if I can try to fix this issue for a project in class.