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

Consistently lowercase email addresses on the wire #5029

Closed
link2xt opened this issue Nov 17, 2023 · 1 comment · Fixed by #5035
Closed

Consistently lowercase email addresses on the wire #5029

link2xt opened this issue Nov 17, 2023 · 1 comment · Fixed by #5035
Labels
enhancement New feature or request

Comments

@link2xt
Copy link
Collaborator

link2xt commented Nov 17, 2023

Trying to reproduce https://support.delta.chat/t/removed-members-and-re-join-via-qr-code/2768 I have created accounts with capitalized first letter in the email address and managed to get a message that has:

  • Chat-Group-Member-Added: rae4aiv8o@nine.testrun.org header
  • Autocrypt-Gossip: addr=Rae4aiv8o@nine.testrun.org; ... header
  • I added member rae4aiv8o@nine.testrun.org. body.

By writing from two setups, one with capitalized letter and another without it is possible to get into a state where peerstate and contact address have different case.

Then there is a check that compares primary self address (contents of configured_addr variable) to the contents of Chat-Group-Member-Added:

context.get_primary_self_addr().await? == *added_addr

I have not managed to reproduce the bug with the contact ignoring being added, but it seems to be possible that Chat-Group-Member-Added contains a capitalized address while the contact thinks the address is fully lowercase and does not recognize the message as adding them. Will try to reproduce it more systematically.

Independently of reproducing and fixing the bug with the member not being added, I think we should enforce the rule that every address sent over the wire (From field, To field, envelope addresses, Chat-Group-Member-Added, Chat-Group-Member-Removed, sync messages etc.) are lowercased even if in the database we store them with a different case. This will prevent the problem from propagating between devices.

There was a related issue before: #4459

@link2xt link2xt self-assigned this Nov 17, 2023
@link2xt link2xt added the enhancement New feature or request label Nov 18, 2023
@link2xt
Copy link
Collaborator Author

link2xt commented Nov 18, 2023

PR for Autocrypt and Autocrypt-Gossip: #5032

@link2xt link2xt removed their assignment Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant