Option to override/turn off Content-Language header
Categories
(Thunderbird :: Message Compose Window, enhancement)
Tracking
(Not tracked)
People
(Reporter: mozilla, Assigned: segfault)
Details
(Keywords: good-first-bug)
Attachments
(1 file, 3 obsolete files)
1.80 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
Comment 1•7 years ago
|
||
Reporter | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Reporter | ||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Reporter | ||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Code should be around here: https://searchfox.org/comm-central/rev/753e6d9df9d7b9a989d735b01c8b280eef388bab/mail/components/compose/content/MsgComposeCommands.js#2604
Assignee | ||
Comment 11•5 years ago
|
||
This is a patch created by Tails to replace part of the functionality previously provided by TorBirdy, i.e. to avoid leaking the user's dictionary in the Content-Language header by overriding it with "en-US".
Comment 12•5 years ago
|
||
You need to ask for review or the patch will be ignored.
Assignee | ||
Comment 13•5 years ago
|
||
You need to ask for review or the patch will be ignored.
Ok... so could you review it? Or what do I have to do to find a reviewer?
Assignee | ||
Comment 14•5 years ago
|
||
I re-read the "Getting reviews" section of https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch. I says "To request a review, you will need to specify one or more usernames either when you submit the patch, or afterward in the UI". And that I should see the Mozilla Phabricator User Guide for details, but there I could only find information about using moz-phab, but I would like to avoid learning how to use a new tool, just to ask for a review, if possible.
I don't know where I should specify the usernames. So I will just try it here: jorgk-bmo or mkmelin, could one of you review this please?
Updated•5 years ago
|
Assignee | ||
Comment 15•5 years ago
|
||
Attachment #9115194 [details] [diff] - Flags: review?(mkmelin+mozilla@iki.fi)
Thanks Jörg. I'll keep in mind for the future that I have to set the review flag to ?
in the attachment.
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 18•5 years ago
|
||
Coming to think of this, the approach isn't right. We store the language in the message so when you save a draft (or template?) and later edit it again, you get the spellcheck language restored. Just storing en-US all the time will destroy that function.
But storing the language in a draft that is sent to the IMAP server is also a metadata leak which we want to prevent. And if the draft is stored locally, the content language isn't preserved anyway.
Agreed it would be better to just avoid setting the header if a pref is set.
Since it's clear from the header that the mail was sent via Thunderbird, and Thunderbird always sets the ContentLanguage header except if this option is set, the fact that it's missing is also a metadata leak which we might want to avoid.
I could also add an option to not set the header at all (once I find out how, skipping the line Jörg pointed me to doesn't work, the header is still being set), but I would prefer to also have an option to override it with en-US (or maybe some other configurable value).
Comment 19•5 years ago
|
||
(In reply to segfault from comment #18)
But storing the language in a draft that is sent to the IMAP server is also a metadata leak which we want to prevent.
Your mail provider already has identifying information, like your e-mail address. In case of MFA, they have your phone number, and if it's a paid service, they have your name, address and credit card number. What are you trying to hide from your (trusted?) e-mail provider? That an e-mail is sent from your account? If you don't trust them, then worse things can happen to you. Like they don't deliver mail to you, they send it to the wrong recipient, or they take part in man in the middle attacks.
And if the draft is stored locally, the content language isn't preserved anyway.
In fact, it is, I've just tested that. Overwriting with en-US is really counterproductive, not every has an en-US version of TB installed. Say someone has en-US and es-ES dictionary installed and writes a draft in Spanish. You'll then restore en-US for him/her. Sorry, that's 100% unacceptable. As Magnus said, if at all, don't write the header, preferably only when sending.
Since it's clear from the header that the mail was sent via Thunderbird, and Thunderbird always sets the ContentLanguage header except if this option is set, the fact that it's missing is also a metadata leak which we might want to avoid.
M$ Outlook has sent the header for decades, only that it was mostly wrong. There's also a User-Agent header that TB sends, or have you suppressed that in some other way?
Assignee | ||
Comment 20•5 years ago
|
||
(In reply to Jorg K (GMT+1) (PTO to 5th Jan 2020, sporadically reading bugmail) from comment #19)
(In reply to segfault from comment #18)
But storing the language in a draft that is sent to the IMAP server is also a metadata leak which we want to prevent.
Your mail provider already has identifying information, like your e-mail address. In case of MFA, they have your phone number, and if it's a paid service, they have your name, address and credit card number. What are you trying to hide from your (trusted?) e-mail provider? That an e-mail is sent from your account? If you don't trust them, then worse things can happen to you. Like they don't deliver mail to you, they send it to the wrong recipient, or they take part in man in the middle attacks.
This option is supposed to replace behavior of TorBirdy, which is an extension for using Thunderbird with Tor. The concept of Tor is to hide the user's identity, even from the servers they are connecting to. That is why we want to prevent metadata, which could be used to fingerprint the user, from leaking to those servers.
And if the draft is stored locally, the content language isn't preserved anyway.
In fact, it is, I've just tested that. Overwriting with en-US is really counterproductive, not every has an en-US version of TB installed.
I also tested it, twice now. Here is what I do (tested with Thunderbird 68.2.2 on Debian sid/unstable and Thunderbird built from current tip):
- Click "Write" to create a new message
- Click the language button in the bottom right corner of the message window and change the language to a non-en-US one. Write some text in that language.
- Click "Save" to save as draft. I have configured the drafts folder to "Local Folders" for this account.
- Close the message.
- Open the message in the local drafts folder, click "Edit".
The result is that the message is opened with language set back to en-US.
Say someone has en-US and es-ES dictionary installed and writes a draft in Spanish. You'll then restore en-US for him/her. Sorry, that's 100% unacceptable. As Magnus said, if at all, don't write the header, preferably only when sending.
OK, I found a way to prevent the ContentLanguage header to be set at all: Setting the content language to an empty string. This way, a user who has their default dictionary set to Spanish will have their drafts re-opened with Spanish instead of en-US. Is that good enough?
Since it's clear from the header that the mail was sent via Thunderbird, and Thunderbird always sets the ContentLanguage header except if this option is set, the fact that it's missing is also a metadata leak which we might want to avoid.
M$ Outlook has sent the header for decades, only that it was mostly wrong. There's also a User-Agent header that TB sends, or have you suppressed that in some other way?
Yes, in fact TorBirdy clears the User-Agent header via pref("general.useragent.override", "");
. My concern is that if we're not doing a good enough job at hiding the fact that the mail was sent via Thunderbird, then the fact that there is no ContentLanguage header means that the user has enabled this very option.
Assignee | ||
Comment 21•5 years ago
|
||
Comment 22•5 years ago
|
||
Hmm, re. steps 1-5: If I repeat them in TB 68.3.1, I get the non-en-US language and non-default language restored, so it works as designed. What's going on with you?
Yes, I guess that setting the language to an empty string will result on the header not being written. That destroys "edit draft" which for some reason is already not working for you. That may be good enough. I won't use that option. Magnus, what do you think?
Comment 23•5 years ago
|
||
Wow, a 300+KB patch. Something has gone wrong there. I'd prefer to call your pref mail.suppress_content_language.
Assignee | ||
Comment 24•5 years ago
|
||
(accidentally committed leftover files from a merge conflict, sorry, I'm not used to mercurial)
Comment 25•5 years ago
|
||
As I said: I'd prefer to call your pref mail.suppress_content_language.
Assignee | ||
Comment 26•5 years ago
|
||
Renamed the pref to mail.suppress_content_language.
Comment 27•5 years ago
|
||
Comment 28•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/9edcc31370ac
Add pref mail.suppress_content_language that when set prevents setting Content-Language header. r=mkmelin
https://hg.mozilla.org/comm-central/rev/cfa51f6ced45
test for mail.suppress_content_language. r=me
Updated•5 years ago
|
Description
•