Check that Url being stored is an actor

main
Bob Mottram 2020-12-12 09:54:42 +00:00
parent f392777393
commit 69aa3455c2
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ def storePersonInCache(baseDir: str, personUrl: str,
allowWriteToFile: bool) -> None:
"""Store an actor in the cache
"""
if 'statuses' in personUrl or personUrl.endswith('/actor'):
# This is not an actor or person account
return
currTime = datetime.datetime.utcnow()
personCache[personUrl] = {
"actor": personJson,