element-hq / element-hq/synapse

`POST /_matrix/client/v3/account/3pid` isn't spec compliant

Open
#13,690 0 comments 0 reactions 0 assignees View on GitHub
A-3PID A-Spec-Compliance O-Uncommon S-Tolerable T-Defect Z-Cleanup
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#13690](https://github.com/matrix-org/synapse/issues/13690).

---

1. Endpoint accepts unspecced `threePidCreds` field as well as specced `three_pid_creds`.

https://github.com/matrix-org/synapse/blob/5f2e43bc870fd8786814a9c83f622581a6eb38af/synapse/rest/client/account.py#L591

2. The spec says an `id_access_token` and `id_server` are required in `ThreePidCredentials`, but Synapse does not enforce the existence of (or even use) those fields.

This endpoint is [deprecated](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3account3pid) so I suggest we fix this by removing the endpoint altogether.

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.