fee57eb376
This brings it in line with its name and closes an, in practice harmless, verification hole. This was/is the only user of contain_origin making it safe to change the behaviour on actor-less objects. Until now refetched objects did not ensure the new actor matches the domain of the object. We refetch polls occasionally to retrieve up-to-date vote counts. A malicious AP server could have switched out the poll after initial posting with a completely different post attribute to an actor from another server. While we indeed fell for this spoof before the commit, it fortunately seems to have had no ill effect in practice, since the asociated Create activity is not changed. When exposing the actor via our REST API, we read this info from the activity not the object. This at first thought still keeps one avenue for exploit open though: the updated actor can be from our own domain and a third server be instructed to fetch the object from us. However this is foiled by an id mismatch. By necessity of being fetchable and our longstanding same-domain check, the id must still be from the attacker’s server. Even the most barebone authenticity check is able to sus this out. |
||
---|---|---|
.. | ||
activity | ||
akkoma | ||
collections | ||
config | ||
conversation | ||
docs | ||
ecto_type/activity_pub/object_validators | ||
emails | ||
emoji | ||
http | ||
instances | ||
integration | ||
mfa | ||
migration_helper | ||
object | ||
password | ||
repo/migrations | ||
search | ||
translators | ||
upload | ||
uploaders | ||
user | ||
web | ||
workers | ||
activity_test.exs | ||
announcement_read_relationship_test.exs | ||
announcement_test.exs | ||
application_requirements_test.exs | ||
bookmark_test.exs | ||
captcha_test.exs | ||
config_db_test.exs | ||
config_test.exs | ||
conversation_test.exs | ||
emoji_test.exs | ||
filter_test.exs | ||
following_relationship_test.exs | ||
formatter_test.exs | ||
frontend_test.exs | ||
hashtag_test.exs | ||
healthcheck_test.exs | ||
html_test.exs | ||
http_test.exs | ||
instances_test.exs | ||
iso639_test.exs | ||
job_queue_monitor_test.exs | ||
keys_test.exs | ||
list_test.exs | ||
marker_test.exs | ||
mfa_test.exs | ||
moderation_log_test.exs | ||
notification_test.exs | ||
object_test.exs | ||
otp_version_test.exs | ||
pagination_test.exs | ||
password_test.exs | ||
registration_test.exs | ||
repo_test.exs | ||
report_note_test.exs | ||
reverse_proxy_test.exs | ||
runtime_test.exs | ||
safe_jsonb_set_test.exs | ||
scheduled_activity_test.exs | ||
signature_test.exs | ||
stats_test.exs | ||
upload_test.exs | ||
user_invite_token_test.exs | ||
user_note_test.exs | ||
user_relationship_test.exs | ||
user_search_test.exs | ||
user_test.exs | ||
utils_test.exs | ||
xml_builder_test.exs |