component AP gateway: ignore actor delection notifications:
When a `Delete` activity was received and the object was the emitting actor itself, the signature checking was failing if the actor was unknown (due to the impossibility to retrieve the actor public key, as it is no more accessible). To avoid that, those notifications are ignored for now. In the future they should clean the cache linked to this actor.
This commit is contained in:
parent
b30a558f13
commit
faf5e43527
1 changed files with 11 additions and 0 deletions
|
|
@ -1039,6 +1039,17 @@ class HTTPAPGServer(web_resource.Resource):
|
|||
)
|
||||
request.finish()
|
||||
return
|
||||
try:
|
||||
if data["type"] == "Delete" and data["actor"] == data["object"]:
|
||||
# we don't handle actor deletion
|
||||
request.setResponseCode(http.ACCEPTED)
|
||||
log.debug(f"ignoring actor deletion ({data['actor']})")
|
||||
# TODO: clean data in cache coming from this actor, maybe with a tombstone
|
||||
request.finish()
|
||||
return
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
signing_actor = await self.checkSignature(request)
|
||||
except exceptions.EncryptionError as e:
|
||||
|
|
|
|||
Loading…
Reference in a new issue