bug: 500 M_UNKNOWN on /login for incomplete password login body #2552

Closed
opened 2026-11-19 12:22:55 +00:00 by se-prok · 3 comments

What is the bug?

The homeserver returns an internal server error instead of a standard client error when the request body for POST /_matrix/client/v3/login is missing the type field (containing only the user and password keys).

Steps to reproduce

The .pcapng file is attached.

Server name and version

continuwuity 26.9.1 (0727d564a)

Additional context

No response

### What is the bug? The homeserver returns an internal server error instead of a standard client error when the request body for `POST /_matrix/client/v3/login` is missing the `type` field (containing only the `user` and `password` keys). ### Steps to reproduce The .pcapng file is attached. ### Server name and version continuwuity 26.9.1 (0727d564a) ### Additional context _No response_
Owner

Based on the stack trace, i think this is a bug in ruma since the call chain on our part ends at the router body deserializer, which explicitly doesn't expect/unwrap anywhere:

Lines 107 to 110 in 0727d56
// Deserialize the body
let body = R::try_from_http_request(request, &borrowed_path)
.map_err(|e| err!(Request(BadJson(debug_warn!("{e}")))))?;

Might be worth filing an issue at https://github.com/ruma/ruma instead. Also, 26.9.1 is outdated and has known vulnerabilities, please upgrade to the latest version as soon as you can (although I doubt it fixes this specific bug)

Based on the stack trace, i think this is a bug in ruma since the call chain on our part ends at the router body deserializer, which explicitly doesn't `expect`/`unwrap` anywhere: https://forgejo.ellis.link/continuwuation/continuwuity/src/commit/0727d564a/src/api/router/args.rs#L107-L110 Might be worth filing an issue at https://github.com/ruma/ruma instead. Also, 26.9.1 is outdated and has known vulnerabilities, please upgrade to the latest version as soon as you can (although I doubt it fixes this specific bug)
Owner

Going to close this as an upstream issue, feel free to re-open if you disagree

Going to close this as an upstream issue, feel free to re-open if you disagree
nex closed this issue 2026-11-23 15:32:31 +00:00
Author

I filed the issue to ruma: https://github.com/ruma/ruma/issues/2685

I filed the issue to ruma: https://github.com/ruma/ruma/issues/2685
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity#2552
No description provided.