proton-contacts
proton-contacts copied to clipboard
Email addresses are considered case-sensitive; key id mismatch errors are shown
Summary:
CS Report: https://proton.atlassian.net/browse/CLIENT-1758
If you have an address saved with a capital letter and the key is assigned to the same address i all lowercase, you will get a mismatch error.
Screenshot:
Please contact if you need test account information.
Not sure if we should correct this. In the code there's a comment
we don't normalize emails because enigmail / pgp also doesn't normalize it.
in the function that checks whether there is a mismatch (if there is, the warning icon is showed).
Maybe @mmso, @twiss can shed some light here? What does the PGP standard say?
The spec says very little concrete:
A User ID packet consists of UTF-8 text that is intended to represent
the name and email address of the key holder. By convention, it
includes an RFC 2822 [RFC2822] mail name-addr, but there are no
restrictions on its content.
I'm not 100% sure what behavior of Enigmail the comment is referring to, but it's certainly plausible that it's checking that the email address in the To:
header matches the one in the User ID.
In any case, it's good practice that they match, and in the future, we might want to do more checks ourselves around this - e.g., sometimes a key might contain multiple User IDs, with different expiry dates for each one, so then we might want to be able to select the correct expiry date based on the email address.
So I tend to agree, I'd leave it as is - the correct solution is for the user to lowercase the email address, but even if they don't it's not a huge deal IMO, it's only a warning, not an error.
there is also a problem with merging contacts where two identical emails will not be recognized as the same email.
guys, the easy way to look at this is, what is better for the user experience as we have to adopt an user first culture.
there is no question that normalizing the capitalizations is better for the user experience for the vast majority of users, so this is what we must do, end of debate.
I agree--I don't think this warning adds any value when the addresses differ only by case. Of course, the lowercasing should only be done for ASCII characters.
So, @bartbutler, should we just remove the warning in the table above? Or also when merging contacts, merge emails which only differ by case? Notice that by default the mail app is generating different contacts for email addresses that differ in the capitalization.
there is also a problem with merging contacts where two identical emails will not be recognized as the same email.
The feature is working for me (meaning two identical emails (if they differ in the capitalization they're not identical) will get merged into one) and has been tested by QA. @B09B1 , could you elaborate? If you find a bug, could you open a github issue about it?