Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Protect From name for verified chats and To names for encrypted chats (#5166) #5183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Septias
Copy link
Contributor

@Septias Septias commented Jan 15, 2024

If a display name should be protected (i.e. opportunistically encrypted), only put the corresponding
address to the unprotected headers. We protect the From display name only for verified chats,
otherwise this would be incompatible with Thunderbird and K-9 who don't use display names from the
encrypted part. Still, we always protect To display names as compatibility seems less critical here.

When receiving a messge, overwrite the From display name but not the whole From field as that would
allow From forgery. For the To field we don't really care. Anyway as soon as we receive a message
from the user, the display name will be corrected.

close #5166

@link2xt link2xt changed the title feat: put display names in ecrypted headers (#5166) feat: put display names in encrypted headers (#5166) Jan 15, 2024
@Septias Septias force-pushed the sk/display_name_in_protected branch from 5b7b83c to 386258e Compare January 16, 2024 17:11
@Septias Septias marked this pull request as ready for review January 16, 2024 17:56
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimeparser.rs Outdated Show resolved Hide resolved
src/mimeparser.rs Outdated Show resolved Hide resolved
src/mimeparser.rs Outdated Show resolved Hide resolved
@Septias Septias requested a review from iequidoo January 17, 2024 09:26
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimeparser.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
src/mimefactory.rs Outdated Show resolved Hide resolved
@Septias
Copy link
Contributor Author

Septias commented Jan 18, 2024

@link2xt are you fine to merge or do you want to look over it again?

@link2xt
Copy link
Collaborator

link2xt commented Jan 18, 2024

This does not currently check if the chat is verified, right?

I wonder if it is fine to do for non-verified chat since it does not work with Thunderbird, need more opinions from others.

@iequidoo
Copy link
Collaborator

I wonder if it is fine to do for non-verified chat since it does not work with Thunderbird, need more opinions from others.

For me it's better not to complicate the code with additional checks for compatibility with other MUAs if it's not critical. Anyway we need to create a Thunderbird issue (at least i can't find such one).

@iequidoo
Copy link
Collaborator

iequidoo commented Jun 3, 2024

Taking this over, people ask for this feature here: https://support.delta.chat/t/technical-question-encrypt-profile-names/3049
CC @Septias

@iequidoo iequidoo self-assigned this Jun 3, 2024
… chats (#5166)

If a display name should be protected (i.e. opportunistically encrypted), only put the corresponding
address to the unprotected headers. We protect the From display name only for verified chats,
otherwise this would be incompatible with Thunderbird and K-9 who don't use display names from the
encrypted part. Still, we always protect To display names as compatibility seems less critical here.

When receiving a messge, overwrite the From display name but not the whole From field as that would
allow From forgery. For the To field we don't really care. Anyway as soon as we receive a message
from the user, the display name will be corrected.
@iequidoo iequidoo force-pushed the sk/display_name_in_protected branch from d467a55 to 7c05bb2 Compare June 4, 2024 18:40
@iequidoo iequidoo changed the title feat: put display names in encrypted headers (#5166) feat: Protect From name for verified chats and To names for encrypted chats (#5166) Jun 4, 2024
@iequidoo iequidoo marked this pull request as ready for review June 4, 2024 19:06
@iequidoo iequidoo requested review from link2xt and r10s June 4, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move display names to protected headers in verified chats
3 participants