I've been offline for a while, so didn't see this originally, but I randomly came across things that seem to be in reaction to this now-removed post.
I fetched the body of the post from the modlog - I'll avoid reposting it here, but wish to respond to the concern that's the "first big one".

Let's imagine that your instance had a minor outage. During that time, a remote user has made a post that their instance is trying to make you aware of by POSTing it to your inbox. It possibly retries a few times, but eventually it gives up.
Now you're online again, and you're receiving Likes and Replies to a post you don't have. Or maybe one of your users has noticed it's missing, so plugged it into the Search box.
What happens now? Well, if your instance is running Lemmy, it fetches it from the original source. This is normal and expected behaviour, and it just a plain old boring GET request.
If - for example - the post was https://lemmy.ml/post/47524469, then you never received a signed Create from https://lemmy.ml/u/yogthos, or a signed Announce from https://lemmy.ml/c/programmerhumor - there's no cryptographic verification at all, but you've asked an instance about activity from one of its own actors, and if you don't trust what it's saying, then you've got much bigger problems.

This isn't any different from what PieFed was doing (as part of its inter-op with PeerTube).
PeerTube has a different federation model than Lemmy. Video channels are like communities in many respects, but if it receives a reply from a remote user to a local video, then instead of sending out signed Announce by the channel (as Lemmy would do), it just resends the original Create out to its followers, but signed by the instance's "Application" actor instead. This meant that these replies were failing signature verification checks, because the 'actor' in the ActivityPub JSON (something like https://example.social/user/alice) was different that the actor who signed the POST (something like https://tinkerbetter.tube/accounts/peertube).
If you wanted to do it 'properly', then first you'd have to have a way of storing Application actors in your database, then you'd have to dig into the request header and get the Signature keyID, and then once that verified, you'd want to make sure that the instance does indeed host the appropriate community. Alternatively, you can think "bollocks to that", and just fetch the content from https://example.social/ instead.

There seemed to be some concern that an attacker could set up evil.com and send an unsigned POST to a PieFed instance saying that https://evil.com/user/alice has made a post to https://evil.com/post/1 and instead of rejected it as unsigned, PieFed would fetch https://evil.com/post/1.
Well ... yeah? If you own evil.com, then you have all the keys for your users, so nothing is stopping you sending posts that are signed by them (it's not like users know their own private keys). As such, whatever you might want to return from a GET request to https://evil.com/post/1 is exactly what you could put in a signed POST request from https://evil.com/user/alice anyway. If you're a malicious user with their own server, then you can pollute the fediverse as much as you like, until you get defederated of course, but the relevant bit of PieFed code wasn't making it any easier for such people.

[–] 2 points 7 months ago

Unless the person replying on Mastodon removes it of course (to save themselves some characters and because they don't recognise it).

There doesn't seem any functional difference between your comment (which implicitly Mentions the community), and the original post on thecanadian.social (which explicitly Mentions it). Screenies from activitypub.academy show that replies to both include both Mentions pre-filled.


https://thecanadian.social/@mike/116234121499688717 didn't remove the Mention, and so the comment made it to Lemmy. https://mstdn.ca/@cass_m/116234270845317774 did remove the Mention, and so it didn't.


Specifically for Lemmy btw, the reply at https://mstdn.ca/@cass_m/116234270845317774 demonstrates another problem - that instance requires a signed GET request for its actors, which hasn't been fully implemented AFAIK.

  • source
  • parent
  • context
  • [–] 1 point 8 months ago (1 child)

    Just come across this myself.

    Long-running fediverse instances will likely have old copies of established aussie.zone actors, but federation will be broke for newer instances and/or newer actors.

    Verifiable by doing something like:

    WORKS:   
    curl --header 'accept: application/activity+json' https://reddthat.com/u/lodion
    
    DOESN'T WORK:   
    curl --header 'accept: application/activity+json' https://aussie.zone/u/lodion
    
    

    I chose reddthat.com because it seems like it has similar protection, but allows for AP requests. (other instances use non-CF solutions, but I imagine they've had to make similar tweaks).

    It's been a couple of days, so it might be worth some pings:

    @admin@aussie.zone

    @lodion@aussie.zone

  • source
  • [–] 4 points 8 months ago

    You can get a rough idea of how big each video is via an activitypub query for each video. For example:

    curl --header 'accept: application/activity+json' https://peertube.wtf/w/mhghLtY5dkLguNq5oFB2Ut | jq .
    

    Buried in there is a url entry, and buried in some of those is a tag entry and buried in some of those are details for the size of the video and audio for each upload.

    Peertube's video channels have an outbox (similar to how Lemmy's communities do, but not limited to 50 entries), so you can step through that to find the relevant info for everything in your channel.

    Doing that for your channel, I got:

    Shitpost #2
    video: 482 x 480: 2.27 MB
    audio: 0.3 MB
    
    Shitpost #1
    video: 480 x 480: 8.69 MB
    audio: 0.94 MB
    
    Will this replace the internet?
    video: 1080 x 1920: 19.26 MB
    video: 720 x 1280: 11.9 MB
    video: 360 x 640: 5.23 MB
    audio: 16.75 MB
    
    Cat
    video: 1920 x 1080: 7.77 MB
    video: 1280 x 720: 2.14 MB
    video: 640 x 360: 0.41 MB
    audio: 0.23 MB
    

    If you assume that the size of the audio is ignored, and that lower resolutions are transcoded as requested, and add the sizes for the highest resolutions together, you get 2.27 + 8.69 + 19.26 + 7.77 = 37.99 (which is the 38 MB visible in your screenshot).

    The information is available, but it's a pain in the arse to get, so it's probably annoying for PeerTube themselves to show (a brief look suggests that the API response doesn't provide it, so there's nothing for the web frontend to display). It's also possible that they may drop the higher resolutions for videos with low engagement, so the size of each upload isn't static, which adds an extra complication.

  • source
  • [–] 5 points 8 months ago (1 child)

    Not really.

    Gup.pe groups were genuine ActivityPub Groups, like Lemmy communities, whereas these 'FediGroup' things are just Mastodon bots. They're a 'Service', aka the automated version of a 'Person', so they're no use to anyone on platforms (like Lemmy) that can only follow Groups.

    The most similar recent thing to gup.pe is https://ovo.st/

    Compare:

    curl --header 'accept: application/activity+json' https://lemmy.world/c/fediverse | jq -r .type   
    => Group   
    curl --header 'accept: application/activity+json' https://ovo.st/club/askfedi | jq -r .type  
    => Group
    
    with
    
    curl --header 'accept: application/activity+json' https://fedigroups.social/@audiofiction | jq -r .type  
    => Service
    
  • source
  • parent
  • context
  • [–] 2 points 9 months ago

    Not the first time that bug's reared its head either.

    Example from here:

    'nsfw': post.nsfw if post.nsfw is not None else False
    

    A meme about PieFed half-arsing database migrations might not be funny, but would at least be valid, and less wearisome than OP's post.

  • source
  • parent
  • context
  • [–] 1 point 9 months ago (2 children)

    I've contributed code to PieFed in the past, but nothing recently. If someone comes across something I've written and finds it amateurish, then that's a reasonable assessment. There's no need for you to delete your comment, as I'm not a fan of features over fixes approach either.

    The "People's Front of Judea" remark relates to a Monty Python sketch from the The Life Of Brian (youtube link) - it's a swipe at leftist infighting (swap out "The only people we hate more than the Romans is the Judean's People's Front" with "The only site we hate more than Reddit is PieFed" I suppose).

  • source
  • parent
  • context
  • [–] -4 points 9 months ago (4 children)

    The OP linked to the function with the 'enoughmuskspam' filter in it: it's here (line 352 if it doesn't auto-scroll down).

    As mentioned, it's a bulk-community import function, that new admins can optionally use to kick-start a new instance.

    The code you've linked to is another convenience function, for users this time, that will optionally add the relevant values to their content filters for the 'All' feed. It's also not a federation block, and it's common enough for fediverse users to want to hide posts about those people that it's value arguably overrides any perceived messiness about 'hard-coding' their names.

    Anyone who takes the time to understand PieFed's codebase could find plenty of things to legitimately criticise. To my mind, though, it seems against the social contract around open-sourcing one's hobbyist project, only for people to then be snarky about it online. If there's bits of code that look like they were written on someone's lunch break, that's because they were.

    The frustrating thing about this post, and the (now deleted) post before it, is that someone has taken more time to create some shit meme than they have reading the code they're haphazardly attacking. I've no idea why PieFed has suddenly come under some Lemmy users sights, especially since the whole point of federated social media is that it shouldn't matter what client someone uses, and how much it reeks of "People Front of Judea" bullshit.

  • source
  • parent
  • context
  • [–] 12 points 9 months ago (6 children)

    This has come up before. Hopefully you're just not understanding the code, rather than deliberately misrepresenting it to others. Even a casual scan should clue people in to the fact that the linked function isn't concerned with federation blocks (the same list that 'enoughmuskspam' is in also contains 'memes' and 'piracy', which every PieFed instance has without any overrides required).

    I'll copy-paste my comment from last time (I can't link to it 'cos is was in reply to a deleted post). The first 2 paras are the most relevant bits:

    The code that OP has linked to is part of a convenience function for admins to add content to their new instances. It can query individual remote instances (e.g. lemmy.world), or it can query lemmyverse.net, and fetch communities that look to be popular and active.

    It’s completely unrelated to routine federation, and doesn’t prevent anyone subscribing to communities that may have those words in their names.

    The admin function could potentially be used to fetch hundreds of communities. It runs as a background process, so you don’t know what they were until after they’d been followed. The “bad words” list acts as a safeguard against bringing in things you might not want or expect. One reason is that you may want to curate the first impression you give new visitors, as there as some that will be put off by the “fuck this” and “shitpost that” reddit-isms. Another is that you don’t typically want communities that are disproportionately popular than others (e.g. if you bring in the default 25 communities, and one of is 196, then it completely dominate your front page).

    If there’s a particular community that you are interested in (e.g. because you moderate it), using this function isn’t an efficient way to add it. In addition to the “bad words” filters, it will also exclude communities that are NSFW, or below thresholds for popularity and activity. Rather than fetching a bunch of communities at the same time, and hoping that the one you want is included, it’s better to just add it manually (via a ! link or by using the “Add remote community” link) in much the same way as you would on any other platform.

  • source
  • [–] 29 points 9 months ago

    It's mostly annoying me because it's affecting federation - not just the ability for new instances to backfill content, but for established instances to even be able to fully resolve a new post's details before the author nukes themselves. For example, the previous post (titled "Paranoia") isn't available on lemmy.ml or lemmy.dbzer0 because they would have been a few seconds "too late" to fetch the details for the author.

    @lawrence@lemmy.world - if you'd like another mod to help out in the short term, I'm happy to volunteer. I realise people in the comments are being a bit defeatist about the ability to reckon with this problem, but whoever this person is should at least have to do a bit more work than they're currently doing.

  • source