Validate the actor_id (AP attributedTo) property.

various-fixes
Alain St-Denis 2023-02-24 08:30:44 -05:00
rodzic 3798d9ddb9
commit 654a8e4396
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -971,6 +971,9 @@ class Note(Object, RawContentMixin):
self._cached_children = value
self.attachment = [Image.from_base(i) for i in value]
def validate_actor_id(self):
if not self.actor_id.startswith('http'):
raise ValueError(f'Invalid actor_id for activitypub ({self.actor_id})')
class Meta:
rdf_type = as2.Note