bug: 500 Internal Server Error ("invalid digit found in string") when passing a malformed string to the from parameter in /messages #2530
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2530
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is the bug?
When a client passes a malformed pagination token (a string containing non-numeric characters) to the
fromquery parameter on theGET /_matrix/client/v3/rooms/{roomId}/messagesendpoint, server returns a500 Internal Server Errorand logs "invalid digit found in string".Server console:
2026-11-14T19:01:33.897820Z ERROR conduwuit_core::error::response: Server error, error: invalid digit found in string, error_debug: invalid digit found in string, kind: Unknown, status: 500 Internal Server Error
at src/core/error/response.rs:17 on conduwuit:worker ThreadId(9)
2026-11-14T19:01:33.897983Z ERROR conduwuit_router::request: 500 Internal Server Error, method: GET, uri: /_matrix/client/v3/rooms/!_HzbfxOuzuJHrkmfjXrEJ5xHEH7n7LZ0DFEM0cat0I0/messages?limit=1&dir=b&from=str37954
at src/router/request.rs:105 on conduwuit:worker ThreadId(9)
in conduwuit_router::layers::router with method=GET path=/_matrix/client/v3/rooms/{room_id}/messages ip="127.0.0.1"
2026-11-14T19:01:33.898054Z ERROR tower_http::trace::on_failure: response failed, classification: Status code: 500 Internal Server Error, latency: 1 ms
at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tower-http-0.7.1/src/trace/on_failure.rs:93 on conduwuit:worker ThreadId(9)
in conduwuit_router::layers::router with method=GET path=/_matrix/client/v3/rooms/{room_id}/messages ip="127.0.0.1"
Steps to reproduce
The .pcapng file containing the request and the response is attached.
Server name and version
continuwuity 26.9.1 (
0727d564a)Additional context
No response
I think this is a duplicate of #2217, just with a different endpoint?