Commit graph

85 commits

Author SHA1 Message Date
1790d41855 Merge branch 'main' into apub-local-object-handling 2020-12-04 14:35:09 +01:00
a90adb8582 add todo 2020-12-04 14:16:38 +01:00
ac73470a17 Send out like.object as URL, instead of full object (fixes #1283) 2020-12-03 16:49:56 +01:00
429b7f6e5c Support parsing like.object either as URL or object 2020-12-03 14:35:34 +01:00
32f69775c3 Fix tests (changes in get_object_from_apub() prevented Update from working) 2020-12-02 18:03:26 +01:00
32c4d3224c Check for community ban when parsing post/comment (fixes #1287) 2020-12-02 16:55:53 +01:00
7649dd048b Create shared, generic implementation for FromApub, prefer local data 2020-12-02 15:08:43 +01:00
af1204c0d0 Add ApubObject trait in DB, with method read_from_apub_id() 2020-12-02 14:25:59 +01:00
nutomic
2b5c69d678 Add check to make sure that inbox doesnt receive local activities (ref #1283) (#147)
Fixed comparison

Add check to make sure that inbox doesnt receive local activities (ref #1283)

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.ml/LemmyNet/lemmy/pulls/147
2020-12-01 18:30:15 +00:00
89f9ecb634 Mark user as updated after fetching 2020-12-01 18:45:46 +01:00
6cf4e39406 Move check for locked post into Comment::from_apub() 2020-12-01 17:41:01 +01:00
9629f8140b cleanup 2020-12-01 17:34:14 +01:00
dbf9c69709 finish this 2020-12-01 17:10:58 +01:00
9cbb80ca8e WIP: alternative way to handle non-local object parsing 2020-12-01 13:00:18 +01:00
2bdb15b06d Limit visibility of some traits and methods 2020-12-01 12:19:24 +01:00
8fc4e1ecfe Add logging to find bug (ref #1283)
Also simplify check_object_domain()
2020-11-30 18:24:10 +01:00
a7b72ed5c4 Set valid context for our extra fields (ref #1220) 2020-11-25 18:44:49 +01:00
b2288fcb9a Make changes on content field backwards compatible 2020-11-25 14:07:04 +01:00
cd3f20e49b Populate content with HTML, and source with markdown (ref #1220) 2020-11-24 18:53:43 +01:00
405ea38959 Add TODO about populating user outbox 2020-11-19 13:50:43 +01:00
48f506277a Create empty outbox for user (ref #1220) 2020-11-18 17:04:35 +01:00
14bf45d099 Dont handle activities twice in inbox 2020-11-16 21:43:52 +01:00
8675fed49c Reduce visibility of some structs and methods (replaces #1266) 2020-11-16 16:44:04 +01:00
fb16f47f2f Add user_inbox check that activities are really addressed to local users 2020-11-11 17:40:45 +01:00
964d95de5c Fix unit tests 2020-11-11 17:28:30 +01:00
06e82fe761 Add pending status for federated follows 2020-11-10 16:45:10 +01:00
dessalines
94dd335fac Merge pull request 'Enforce post lock in federation inbox' (#129) from enforce-post-lock into main
Reviewed-on: https://yerbamate.ml/LemmyNet/lemmy/pulls/129
2020-11-10 13:16:13 +00:00
e1fd614dd1 Fixed bug where comments with mentions were treated as private message 2020-11-09 19:18:23 +01:00
3b4c3ec074 Enforce post lock in federation inbox 2020-11-09 17:06:54 +01:00
8803e7834f Enforce site and community bans for federated users 2020-11-09 15:29:36 +01:00
b469b6d8d3 Separate logic for user and community inbox
more refactoring with tons of changes:

- inbox functions return LemmyError instead of HttpResponse
- announce is done directly in community inbox
- reorganized functions for handling inbox activities
- additional checks for private messages
- moved inbox handler functions for post, comment, vote into separete file
- ensure that posts, comments etc are addressed to public (ref #1220)
- probably more
2020-11-09 13:42:08 +01:00
nutomic
7c51a36012 In activity table, remove user_id and add sensitive (#127)
Forgot to add migrations

Add `sensitive` column to activities table, so PMs arent served over HTTP

Remove user_id column from actvity table

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.ml/LemmyNet/lemmy/pulls/127
2020-11-06 13:06:47 +00:00
nutomic
b7d2dac9bf Fix federation of community removal/deletion, added docs (#125)
Adding a federation test for community deletes / removes.

Add missing docs for community deletion/removal (fixes #1250)

Fix federation of community deletion/removal (fixes #1253)

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/125
2020-11-05 20:19:06 +00:00
Dessalines
7ef044231f
Update cargo deps, upgrading lettre. #789 (#1234)
* Update cargo deps, upgrading lettre. #789

* Adding a comment

* Adding some better expect messages.

* Fixing lettre email.
2020-10-30 13:19:00 -04:00
dessalines
3bf885329d Merge pull request 'Ignore incoming activities which have been received before, add /activities endpoint' (#118) from activity-checks into main
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/118
2020-10-27 16:26:16 +00:00
9e24eda752 In comment create/update, include parent creator in cc (ref #698) 2020-10-27 16:57:44 +01:00
dessalines
53c9094d46 Merge pull request 'Limit amount of HTTP requests to handle activities (fixes #1221)' (#117) from request-limit into main
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/117
2020-10-26 15:35:39 +00:00
99abc49040 Add /activities endpoint (ref #1220) 2020-10-26 12:54:27 +01:00
6d17d5ead2 Ignore incoming activities which have been received before (ref #1220) 2020-10-23 14:29:56 +02:00
dessalines
73ccbb1bc8 Merge pull request 'Organise activity receive files by object type, not by activity type' (#115) from inbox-refactoring-2 into main
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/115
2020-10-22 18:55:28 +00:00
3d5647b16f Limit amount of HTTP requests to handle activities (fixes #1221) 2020-10-22 20:27:32 +02:00
b08e0a6415 Dont allow localhost or raw IPs in activitypub IDs (ref #1221) 2020-10-22 18:12:43 +02:00
1a3b96b054 Organise activity receive files by object type, not by activity type 2020-10-21 19:37:50 +02:00
Dessalines
18b3eab909
Merge pull request #1209 from LemmyNet/fix-actor-name-confusion
Swap name and preferredUsername apub fields
2020-10-19 11:52:35 -04:00
695272f980 Create rustdoc for activitypub code 2020-10-19 16:29:35 +02:00
06a6bab2c1 Swap name and preferredUsername apub fields 2020-10-16 22:44:40 +02:00
Dessalines
571c71392e
Adding API and APUB URL checks for banners and icons. Fixes #1199 (#1200)
* Adding API and APUB URL checks for banners and icons. Fixes #1199

* Adding a check optional url.

* Missed a few.
2020-10-15 18:23:56 +00:00
fe15ff3c51 Also verify activity domains in shared inbox (fixes #1196) 2020-10-15 15:38:49 +02:00
39cbe5f31f Add method verify_activity_domains_valid() (ref #1196) 2020-10-15 15:38:03 +02:00
3f9ede79ed Add domain checks for private message inbox 2020-10-13 18:06:26 +02:00