Limit number of items read from community outbox #84

Merged
dessalines merged 1 commits from limit-outbox-fetch-size into main 2020-08-13 13:20:37 +00:00
Owner

Without this, a hostile instance could send an outbox with 1000 or more items, and completely overload any Lemmy instance that tries to follow it.

I believe this is the only place where we fetch items in a loop, so this should be a fix for limit number of additional fetches for each activtypub object or activity in #647. But maybe we should still add some kind of counter to be sure.

Without this, a hostile instance could send an outbox with 1000 or more items, and completely overload any Lemmy instance that tries to follow it. I believe this is the only place where we fetch items in a loop, so this should be a fix for `limit number of additional fetches for each activtypub object or activity` in [#647](https://github.com/LemmyNet/lemmy/issues/647). But maybe we should still add some kind of counter to be sure.
nutomic reviewed 2020-08-13 12:32:28 +00:00
@ -161,3 +161,3 @@
// Can't do a regex here, reverse lookarounds not supported
pub fn is_valid_preferred_username(preferred_username: &str) -> bool {
!preferred_username.starts_with("@")
!preferred_username.starts_with('@')
Author
Owner

Clippy was complaining about this.

Clippy was complaining about this.
Owner

Cool, no idea why clippy sometimes misses things on my end.

Cool, no idea why clippy sometimes misses things on my end.
Author
Owner

Try doing rustup update nightly?

Try doing `rustup update nightly`?
dessalines merged commit 9a343cfe8b into main 2020-08-13 13:20:36 +00:00
nutomic deleted branch limit-outbox-fetch-size 2020-08-13 13:54:14 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LemmyNet/lemmy#84
No description provided.