matrix-org/dendrite
Dendrite does not validate `senders` and `rooms` IDs in filters
Aperta
#2067 aperta il 2 dic 2021
C-Client-APIF-FiltersT-Defectgood first issue
Metriche repository
- Star
- (5632 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
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