add missing length checks on pushkey/appid, improve error msgs for pusher

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-11-23 12:53:26 -05:00
parent f15370027e
commit 9d23a2b6f5
No known key found for this signature in database
2 changed files with 33 additions and 25 deletions

View file

@ -441,9 +441,9 @@ pub(crate) async fn set_pushers_route(
) -> Result<set_pusher::v3::Response> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
services.pusher.set_pusher(sender_user, &body.action);
services.pusher.set_pusher(sender_user, &body.action)?;
Ok(set_pusher::v3::Response::default())
Ok(set_pusher::v3::Response::new())
}
/// user somehow has bad push rules, these must always exist per spec.