mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-07 07:49:26 +00:00
stack overflow fix
This commit is contained in:
parent
34c392c6a9
commit
ef5fb4cf16
|
@ -30,18 +30,13 @@ where
|
||||||
<ActorT as ApubObject>::Error: From<Error> + From<anyhow::Error>,
|
<ActorT as ApubObject>::Error: From<Error> + From<anyhow::Error>,
|
||||||
Datatype: Clone,
|
Datatype: Clone,
|
||||||
{
|
{
|
||||||
dbg!(1);
|
|
||||||
verify_inbox_hash(request.headers().get("Digest"), &body)?;
|
verify_inbox_hash(request.headers().get("Digest"), &body)?;
|
||||||
dbg!(2);
|
|
||||||
|
|
||||||
let activity: Activity = serde_json::from_slice(&body)?;
|
let activity: Activity = serde_json::from_slice(&body)?;
|
||||||
dbg!(3);
|
|
||||||
data.config.verify_url_and_domain(&activity).await?;
|
data.config.verify_url_and_domain(&activity).await?;
|
||||||
dbg!(4);
|
|
||||||
let actor = ObjectId::<ActorT>::from(activity.actor().clone())
|
let actor = ObjectId::<ActorT>::from(activity.actor().clone())
|
||||||
.dereference(data)
|
.dereference(data)
|
||||||
.await?;
|
.await?;
|
||||||
dbg!(5);
|
|
||||||
|
|
||||||
verify_signature(
|
verify_signature(
|
||||||
request.headers(),
|
request.headers(),
|
||||||
|
@ -49,7 +44,6 @@ where
|
||||||
request.uri(),
|
request.uri(),
|
||||||
actor.public_key_pem(),
|
actor.public_key_pem(),
|
||||||
)?;
|
)?;
|
||||||
dbg!(6);
|
|
||||||
|
|
||||||
debug!("Receiving activity {}", activity.id().to_string());
|
debug!("Receiving activity {}", activity.id().to_string());
|
||||||
activity.verify(data).await?;
|
activity.verify(data).await?;
|
||||||
|
|
|
@ -285,7 +285,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn verify(&self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
|
async fn verify(&self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
|
||||||
(*self).verify(data).await
|
self.deref().verify(data).await
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn receive(self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
|
async fn receive(self, data: &Data<Self::DataType>) -> Result<(), Self::Error> {
|
||||||
|
|
Loading…
Reference in a new issue