don't unwrap reqwest requests for appservice and pushers too
this is another denial of service vector, but less severe than the federation one. Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
@@ -39,8 +39,7 @@ where
|
|||||||
);
|
);
|
||||||
*http_request.uri_mut() = parts.try_into().expect("our manipulation is always valid");
|
*http_request.uri_mut() = parts.try_into().expect("our manipulation is always valid");
|
||||||
|
|
||||||
let mut reqwest_request = reqwest::Request::try_from(http_request)
|
let mut reqwest_request = reqwest::Request::try_from(http_request)?;
|
||||||
.expect("all http requests are valid reqwest requests");
|
|
||||||
|
|
||||||
*reqwest_request.timeout_mut() = Some(Duration::from_secs(30));
|
*reqwest_request.timeout_mut() = Some(Duration::from_secs(30));
|
||||||
|
|
||||||
|
|||||||
@@ -66,8 +66,7 @@ impl Service {
|
|||||||
})?
|
})?
|
||||||
.map(|body| body.freeze());
|
.map(|body| body.freeze());
|
||||||
|
|
||||||
let reqwest_request = reqwest::Request::try_from(http_request)
|
let reqwest_request = reqwest::Request::try_from(http_request)?;
|
||||||
.expect("all http requests are valid reqwest requests");
|
|
||||||
|
|
||||||
// TODO: we could keep this very short and let expo backoff do it's thing...
|
// TODO: we could keep this very short and let expo backoff do it's thing...
|
||||||
//*reqwest_request.timeout_mut() = Some(Duration::from_secs(5));
|
//*reqwest_request.timeout_mut() = Some(Duration::from_secs(5));
|
||||||
|
|||||||
Reference in New Issue
Block a user