Commit Graph

77 Commits (53d449d5d708bb47028fcfd928a3552c86d3370b)

Author SHA1 Message Date
nutomic a496d8af65 Implement undo<dislike> for activitypub (#83)
Merge branch 'main' into undo-dislike

Implement undo<dislike> for activitypub

Fix some TODOs in activitypub code

Add post_read back in, do some cleanup

Add some delete functions back in

Merge branch 'main' into remove-dead-code

Replace body of unused db functions with unimplemented!()

Remove dead code

Remove remaining usages of unwrap() from activitypub code

Remove most usage of Option::unwrap() from activitypub code

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/83
4 years ago
nutomic 3da47352be Remove usage of Option::unwrap() in activitypub code (#80)
Remove remaining usages of unwrap() from activitypub code

Remove most usage of Option::unwrap() from activitypub code

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/80
4 years ago
Felix Ableitner 313f315896 Various adjustments after review 4 years ago
Felix Ableitner cc2c7db9fe Add security checks and slur checks for activitypub inbox 4 years ago
Felix Ableitner 233aa34d54 Verify ID of received apub objects against domain allowlist etc 4 years ago
Felix Ableitner 9a004c4535 Update activitystreams to 0.7.0-alpha.3 (from crates.io) 4 years ago
Felix Ableitner 8ad4378960 Disable ID domain check in FromApub until we figure it out properly 4 years ago
Felix Ableitner a85873d294 Take correct community uri in shared_inbox, rename fetch_remote* methods 4 years ago
Dessalines ced3cbde73 Merge branch 'main' into inbox-refactoring-dessalines 4 years ago
Felix Ableitner 494fcfdb8f Add helper function to generate proper activity IDs 4 years ago
Dessalines 1ed63e99d9 Fix post thumbnail_url to use full urls. Fixes #632 4 years ago
Dessalines 6e4599411b
Adding inferno-helmet to fix page titles. Fixes #1028 (#1030) 4 years ago
Dessalines c066915b8e
Federate sticky flag dessalines (#1021)
* Federate sticky flag (ref #1018)

* Adding tests for federated sticky and lock.

* Changing test to make sure it returns the correct locked error.

Co-authored-by: Felix Ableitner <me@nutomic.com>
4 years ago
Dessalines b03a2d7995 Ran cargo fmt. 4 years ago
nutomic 77a2a5eb01 Update activitystreams library to latest version (#71)
Merge branch 'main' into more-upgrade-apub-3

Update activitystreams library to latest version

Remove remaining usages of old activitystreams library

Migrate community inbox and user inbox

Migrate private message

Migrate post

Migrate community activities

Migrate extensions to new activitystreams library

Co-authored-by: dessalines <dessalines@noreply.yerbamate.dev>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/71
4 years ago
Felix Ableitner 2d4c41d2be Convert comments to new apub lib (including comment activities) 4 years ago
Felix Ableitner ef8118f40f migrate post to new apub lib 4 years ago
ryexandra 29037b4995
Security/fix permission bugs (#966)
* secure the `EditPost` API endpoint

* Check user is moderator in BanFromCommunity

* secure the `EditComment` API endpoint

* pass orig `read` prob when not explicitly updating it.

* Block random users from adding mods.

* use cleaner logic from `EditPost`

* prevent editing a community by a mod from transfering ownership to them

* secure `read` action in `EditPrivateMessage`

* Add check in UserMention

* only let the indended recipient mark as read

* simplify booleans to satisfy clippy

* requested changes + cargo +nightly fmt

* fix to pass federation tests for deleting comments and posts

Co-authored-by: chiminh <chiminh.tutanota.com>
Co-authored-by: Hex Bear <buildadangtrain@protonmail.com>
4 years ago
Felix Ableitner bb3e29e5c4 Make reads from activitypub objects immutable 4 years ago
nutomic 80aef61aed Split code into cargo workspaces (#67)
More fixes

- fixed docker builds
- fixed mentions regex test
- fixed DATABASE_URL stuff
- change schema path in diesel.toml

Address review comments

- add jsonb column back into activity table
- remove authors field from cargo.toml
- adjust LEMMY_DATABASE_URL env var usage
- rename all occurences of LEMMY_DATABASE_URL to DATABASE_URL

Decouple utils and db

Split code into cargo workspaces

Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/67
4 years ago
Felix Ableitner c9338027f2 Migrate user and group to new activitystreams library 4 years ago
Riley a074564458
Federation async (#848)
* Asyncify more

* I guess these changed

* Clean PR a bit

* Convert more away from failure error

* config changes for testing federation

* It was DNS

So actix-web's client relies on TRust DNS Resolver to figure out
where to send data, but TRust DNS Resolver seems to not play nice
with docker, which expressed itself as not resolving the name to
an IP address _the first time_ when making a request. The fix was
literally to make the request again (which I limited to 3 times
total, and not exceeding the request timeout in total)

* Only retry for connecterror

Since TRust DNS Resolver was causing ConnectError::Timeout,
this change limits the retry to only this error, returning
immediately for any other error

* Use http sig norm 0.4.0-alpha for actix-web 3.0 support

* Blocking function, retry http requests

* cargo +nightly fmt

* Only create one pictrs dir

* Don't yarn build

* cargo +nightly fmt
4 years ago
Felix Ableitner 3999e0485e migrate tombstone 4 years ago
Felix Ableitner 1aa30d855e address review comments 4 years ago
Felix Ableitner f3aba6da92 fix comment notifications 4 years ago
Felix Ableitner c34cc46c2d get it working (mostly) 4 years ago
Felix Ableitner 8f9bd1fef7 get some more things working 4 years ago
Felix ce0a37cdf1 get it working (mostly) 4 years ago
Felix cac7011d53 move logic to sharedinbox 4 years ago
Felix 5753c4feaa Let community announce posts 4 years ago
Dessalines a9af247f1e Merge branch 'federated_embeds' into federation 4 years ago
Felix d1aca27126 Use activitystreams-ext 4 years ago
Dessalines f15c3b4e1e Merge branch 'yerba_rework-imports' into federation 4 years ago
Felix 9e61c3be94 Rework imports 4 years ago
Dessalines f88180650d Adding federated embeds via the preview field. 4 years ago
Dessalines 020b9b8cdd Post thumbnail and user icons federating. 4 years ago
Dessalines 940dc73f28 Federated mentions. Fixes #681 (#717)
* Federated mentions. Fixes #681

* Changing some todos, adding comments.
4 years ago
Felix 13ca47a3b4 Use ActorType for sign/verify, instead of passing raw privatekey/actor_id 4 years ago
Felix 11acc7225e Add helper function for Activity::create() 4 years ago
Felix 7485f1a5b4 Federate nsfw/locked info for posts 4 years ago
Dessalines fab22e3d8a Add federated comment and post undo like. 4 years ago
Dessalines dfc9637230 Merge branch 'federation' into federated_remove_actions 4 years ago
Dessalines 211ef795e9 Some additional notes, reorg. 4 years ago
Dessalines a09c818746 Adding federated mod remove actions. 4 years ago
Dessalines 5366797a4b Add undos for delete community, post, and comment. 4 years ago
Dessalines 2f1cd9976d Adding federated community, comment, and post deletes.
- Unit tests added too.
- No undeletes working yet.
4 years ago
Felix 770dcbdc49 wip: add former_type to tombstone 4 years ago
Felix c43f06124a Address comments, implement delete for posts and comments 4 years ago
Felix 0c0c683986 Implement deleting communities 4 years ago
Dessalines 3b62f58dd2 Adding federated post and comment likes. 4 years ago