element-hq / element-hq/element-web

Password change shows vague "HTTP status 400" message if it doesn't follow policy

Open
#16,846 5 comments 0 reactions 0 assignees View on GitHub
T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Description

When a user change their password to something that doesn't follow the password policy set on the homeserver, Element shows a vague "HTTP status 400" error which causes confusion.

![image](https://user-images.githubusercontent.com/18437312/113317224-7021fc00-930f-11eb-929a-95af550cf73d.png)

I believe this is an issue on Element side and not Synapse's as taking a peek in the received response for the password change API request, it clearly tells what the issue is:

![image](https://user-images.githubusercontent.com/18437312/113317340-934cab80-930f-11eb-8f1a-c9554999eb31.png)

Transcribed here in case people are unable to read the picture:

```json
{
"errcode":"M_PASSWORD_NO_SYMBOL",
"error":"The password must include at least one symbol"
}
```

### Steps to reproduce

- Go to General Settings
- Change your password to something which doesn't follow the password policy
- See vague "HTTP status 400"

### Version information

- **Platform**: Web
- **Browser**: Chrome
- **OS**: Windows
- **URL**: app.element.io

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.