Commit Graph

25 Commits

Author SHA1 Message Date
Oneric fee57eb376 Move actor check into fetch_and_contain_remote_object_from_id
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.
2024-03-25 14:05:05 -01:00
Oneric 2bcf633dc2 Document Pleroma.Object.Fetcher 2024-03-25 14:05:05 -01:00
Alexander Strizhakov 17f28c0507
mastodon pins 2021-03-25 13:03:40 +03:00
Haelwenn (lanodan) Monnier c4439c630f
Bump Copyright to 2021
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
2021-01-13 07:49:50 +01:00
Haelwenn (lanodan) Monnier 921f926e96
Remove OStatus in testsuite 2020-09-08 18:43:57 +02:00
Haelwenn (lanodan) Monnier 82895a4012
SideEffects: port ones from ActivityPub.do_create and ActivityPub.insert 2020-07-15 11:40:23 +02:00
lain 3c2c32b460 Merge branch 'remake-remodel' into develop 2020-03-19 18:00:55 +01:00
Haelwenn (lanodan) Monnier 6da6540036
Bump copyright years of files changed after 2020-01-07
Done via the following command:
git diff fcd5dd259a --stat --name-only | xargs sed -i '/Pleroma Authors/c# Copyright © 2017-2020 Pleroma Authors <https:\/\/pleroma.social\/>'
2020-03-02 06:08:45 +01:00
Egor Kislitsyn 22018adae6
Fix Dialyzer warnings 2020-02-25 18:34:56 +04:00
lain e9993acdbb Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel 2019-12-04 16:35:59 +01:00
lain e835cd97f6 Containment: Add a catch-all clause to contain_origin. 2019-11-12 12:07:17 +01:00
Ariadne Conill 5b60d82592 object containment: handle all cases where ID is invalid (missing, nil, non-string) 2019-11-08 14:51:28 -06:00
lain 1bd1f62af5 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel 2019-11-05 15:21:00 +01:00
Ariadne Conill 44e64af5e7 object: containment: simplify the pattern match for OStatus testsuite hack 2019-10-18 15:39:15 +00:00
Ariadne Conill e99fdfc32d object: containment: only allow OStatus references in test suite environment 2019-10-18 15:37:14 +00:00
Ariadne Conill 7295a05cee object: containment: also allow OStatus object IDs through when comparing origins 2019-10-18 14:50:10 +00:00
Ariadne Conill bf2107743f object: containment: don't try to contain ostatus objects 2019-10-18 14:50:10 +00:00
lain 081e8206ab Transmogrifier: Use new ingestion pipeline for Likes. 2019-10-16 17:03:21 +02:00
Ariadne Conill 739bbe0d3b security: detect object containment violations at the IR level
It is more efficient to check for object containment violations at the IR
level instead of in the protocol handlers.  OStatus containment is especially
a tricky situation, as the containment rules don't match those of IR and
ActivityPub.

Accordingly, we just always do a final containment check at the IR level
before the object is added to the IR object graph.
2019-07-14 17:47:08 +00:00
Egor 58a094b605 Add copyright info to containment.ex 2019-06-14 09:26:36 +00:00
William Pitcock e71ddf23ba containment: remove pointless moduledoc line 2019-05-07 16:11:22 +00:00
Haelwenn (lanodan) Monnier 69a5074893
Remove H1 in @moduledoc 2019-05-06 04:53:12 +02:00
rinpatch 35ac672b8d Remove containment tests from transmogrifier and fix thread visibility solver 2019-04-17 17:59:15 +03:00
rinpatch 627e5a0a49 Merge branch 'develop' into feature/database-compaction 2019-04-17 12:22:32 +03:00
William Pitcock e8caecb5c7 object: move object containment out of transmogrifier into it's own module 2018-12-04 04:52:09 +00:00