Limit number of items read from community outbox #84
Loading…
Reference in New Issue
No description provided.
Delete Branch "limit-outbox-fetch-size"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.@ -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('@')
Clippy was complaining about this.
Cool, no idea why clippy sometimes misses things on my end.
Try doing
rustup update nightly
?