matrix-org/dendrite
Dendrite does not validate `senders` and `rooms` IDs in filters
オープン
#2,067 opened on 2021/12/02
C-Client-APIF-FiltersT-Defectgood first issue
Repository metrics
- Stars
- (5,632 個のスター)
- PR merge metrics
- (PR metrics pending)
説明
Background information
- Dendrite version or git SHA: 83b9cb4d79123ec89e18a46d5202e74a9e9305b8
- Running in Docker?: yes
This was found while running Complement, so build information from this Dockerfile also applies.
Description
When working on matrix-org/complement@8021d43 (#259), dendrite failed the tests with the following logs;
client.go:392: POST hs1/_matrix/client/r0/user/@alice:hs1/filter => 200 OK (84.506966ms)
invalid_test.go:180: Expected 4XX status code, got 200 for testing filter map[room:map[timeline:map[rooms:[not_a_room_id]]]]
client.go:392: POST hs1/_matrix/client/r0/user/@alice:hs1/filter => 200 OK (57.808076ms)
invalid_test.go:180: Expected 4XX status code, got 200 for testing filter map[room:map[timeline:map[senders:[not_a_sender_id]]]]
This test comes from sytest, and i am pretty sure that dendrite should at least try to validate these strings to valid User IDs and Room IDs