element-hq / element-hq/element-android

Can create account when entering uppercase letters in the login field

Open
#7,208 0 comments 0 reactions 0 assignees View on GitHub
A-Signup O-Occasional S-Minor T-Defect Z-FTUE
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

1. Create an account with capital letter in the login
2. An error is displayed, but I can still click on NEXT

image

Also, when running
> curl -X GET -H "User-Agent: Element dbg/1.5.0-dev (Linux; U; Android 9; Android SDK built for arm64 Build/PSR1.210301.009.B; Flavour GooglePlay; MatrixAndroidSdk2 1.5.0)" 'http://127.0.0.1:8080/_matrix/client/r0/register/available?username=UiAutoTest_4970461588975347119'

We can see that there is a 400 error, but Element Android sometimes claims that the username is taken (conflict between local validation and `/available` request result). If the format is not valid, we should not call `/available`.

### Outcome

#### What did you expect?
Cannot click on NEXT if login contain capital letters.

#### What happened instead?
Can click on NEXT.
On matrix.org, the account is still created but the login has been lowercased. this is not guarantee to work on other homeserver

### Your phone model

any

### Operating system version

any

### Application version and app store

1.5.0

### Homeserver

any

### Will you send logs?

No

### Are you willing to provide a PR?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.