Commit graph

11 commits

Author SHA1 Message Date
strawberry
c46a47d9d9 why did i have to run cargo fmt twice
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:20:57 -05:00
strawberry
69cd15d5c7 fix formatting and links of user reports more
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:20:57 -05:00
strawberry
f54389085c fix /report endpoint a lot
in short, the `/report` endpoint now checks if:
- the reporting room in the URI matches the PDU/event reported
- sender user is in the room reported
- raises report reasoning to 750 characters (spec doesn't say to limit
these, but thorough and informative reports for server admins are not
a bad thing)
- (hopefully) fixes some broken formatting
- add a random short delay before sending a successful response to the
client to make it more annoying to enumerate for events on our server
(security by obscurity but spec suggests it)

basically, secure reports better lol

see https://spec.matrix.org/v1.9/client-server-api/#post_matrixclientv3roomsroomidreporteventid

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:20:57 -05:00
strawberry
2bcc25c848 require sender_user being in the reporting room for /report events
Matrix 1.8 change:
https://spec.matrix.org/v1.9/client-server-api/#post_matrixclientv3roomsroomidreporteventid

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:20:57 -05:00
strawberry
75e1b84904 fix more clippy lints (part 1)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:20:57 -05:00
strawberry
3723d37b14 raise report reason limit to 500 (though spec doesnt say to limit these)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-06 16:16:44 -05:00
Jonas Platte
d39ce1401d
WIP: Upgrade Ruma 2022-12-16 11:57:32 +01:00
Timo Kösters
a4637e2ba1
cargo fmt 2022-10-10 14:02:01 +02:00
Timo Kösters
8708cd3b63
431 errors left 2022-10-10 14:02:00 +02:00
Timo Kösters
057f8364cc
fix: some compile time errors
Only 174 errors left!
2022-10-10 13:25:01 +02:00
Timo Kösters
025b64befc
refactor: renames and split room.rs 2022-08-15 16:30:34 +02:00
Renamed from src/client_server/report.rs (Browse further)