element-hq / element-hq/element-ios

Unable to decrypt message involving unicode MXID domain

Open
#6,157 1 comment 7 reactions 0 assignees View on GitHub
A-Message O-Uncommon S-Critical T-Defect
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

Encrypted messages sent from iOS can't be decrypted by homeservers that are using an unicode domain name.

Unencrypted messages or encrypted messages from other clients to the unicode MXID can be decrypted.

### Steps to reproduce

Steps to reproduce the behavior:
1. Create an encrypted room with an user that uses a MXID which involves unicode character (@i401:xn--vl1a.moe in this case)
2. Send a message
3. Message can't be decrypted

Screenshots

i4-tst in this case is on the iOS-Element client.
![unicode_matrix](https://user-images.githubusercontent.com/41926529/168450566-c08636db-2a9d-43b6-b920-5ab33957e06a.png)

### Outcome

#### What did you expect?

Encrypted messages should be decrypted

#### What happened instead?

Message can't be decrypted and re-request encryption keys silently fails.

### Your phone model

iPhoneX

### Operating system version

iOS15.4.1

### Application version

Element version 1.8.14

### Homeserver

matrix.org

### Will you send logs?

No

Contributor guide

Open the contributing guide

Research direction

The report names no source file or test. Start by reproducing the failure with the reported Unicode MXID and trace the iOS encrypted-message key re-request and decryption path, comparing it with unencrypted messages and other clients. Done means encrypted messages decrypt and key requests no longer fail silently for the reported domain.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.