• RedWizard [he/him]@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    There are all kinds of fun stuff in the Piefed code. Allow me to dredge up a comment I made recently:

    @edie@lemmy.encryptionin.space was looking at PieFed code the other week, and I ended up taking a look at it too. Its great fun to sneak a peak at.

    For example, you cannot cast a vote on PieFed if you’ve made 0 replies, 0 posts, AND your username is 8 characters long:

        def cannot_vote(self):
            if self.is_local():
                return False
            return self.post_count == 0 and self.post_reply_count == 0 and len(
                self.user_name) == 8  # most vote manipulation bots have 8 character user names and never post any content
    

    If a reply is created, from anywhere, that only contains the word “this”, the comment is dropped (CW: ableism in the function name):

    def reply_is_stupid(body) -> bool:
        lower_body = body.lower().strip()
        if lower_body == 'this' or lower_body == 'this.' or lower_body == 'this!':
            return True
        return False
    

    Every user (remote or local) has an “attitude” which is calculated as follows: (upvotes cast - downvotes cast) / (upvotes + downvotes). If your “attitude” is < 0.0 you can’t downvote.

    Every account has a Social Credit Score, aka your Reputation. If your account has less than 100 reputation and is newly created, you are not considered “trustworthy” and there are limitations placed on what your account can do. Your reputation is calculated as upvotes earned - downvotes earned aka Reddit Karma. If your reputation is at -10 you also cannot downvote, and you can’t create new DMs. It also flags your account automatically if your reputation is to low:

    PieFed boasts that it has “4chan image detection”. Let’s see how that works in practice:

                if site.enable_chan_image_filter:
                    # Do not allow fascist meme content
                    try:
                        if '.avif' in uploaded_file.filename:
                            import pillow_avif  # NOQA
                        image_text = pytesseract.image_to_string(Image.open(BytesIO(uploaded_file.read())).convert('L'))
                    except FileNotFoundError:
                        image_text = ''
                    except UnidentifiedImageError:
                        image_text = ''
    
                    if 'Anonymous' in image_text and (
                            'No.' in image_text or ' N0' in image_text):  # chan posts usually contain the text 'Anonymous' and ' No.12345'
                        self.image_file.errors.append(
                            "This image is an invalid file type.")  # deliberately misleading error message
                        current_user.reputation -= 1
                        db.session.commit()
                        return False
    

    Yup. If your image contains the word Anonymous, and contains the text No. or N0 it will reject the image with a fake error message. Not only does it give you a fake error, but it also will dock your Social Credit Score. Take note of the current_user.reputation -= 1

    PieFed also boasts that it has AI generated text detection. Let’s see how that also works in practice:

    # LLM Detection
            if reply.body and '—' in reply.body and user.created_very_recently():
                # usage of em-dash is highly suspect.
                from app.utils import notify_admin
                # notify admin
    

    This is the default detection, apparently you can use an API endpoint for that detection as well apparently, but it’s not documented anywhere but within the code.

    Do you want to leave a comment that is just a funny gif? No you don’t. Not on PieFed, that will get your comment dropped and lower your Social Credit Score!

            if reply_is_just_link_to_gif_reaction(reply.body) and site.enable_gif_reply_rep_decrease:
                user.reputation -= 1
                raise PostReplyValidationError(_('Gif comment ignored'))
    

    How does it know its just a gif though?

    def reply_is_just_link_to_gif_reaction(body) -> bool:
        tmp_body = body.strip()
        if tmp_body.startswith('https://media.tenor.com/') or \
                tmp_body.startswith('https://media1.tenor.com/') or \
                tmp_body.startswith('https://media2.tenor.com/') or \
                tmp_body.startswith('https://media3.tenor.com/') or \
                tmp_body.startswith('https://i.giphy.com/') or \
                tmp_body.startswith('https://i.imgflip.com/') or \
                tmp_body.startswith('https://media1.giphy.com/') or \
                tmp_body.startswith('https://media2.giphy.com/') or \
                tmp_body.startswith('https://media3.giphy.com/') or \
                tmp_body.startswith('https://media4.giphy.com/'):
            return True
        else:
            return False
    

    I’m not even sure someone would actually drop a link like this directly into a comment. It’s not even taking into consideration whether those URLs are part of a markdown image tag.

    As Edie mentioned, if someone has a user blocked, and that user replies to someone, their comment is dropped:

    if parent_comment.author.has_blocked_user(user.id) or parent_comment.author.has_blocked_instance(user.instance_id):
        log_incoming_ap(id, APLOG_CREATE, APLOG_FAILURE, saved_json, 'Parent comment author blocked replier')
        return None
    

    For Example:

    (see Edies original comment here)

    More from Edie:

    Also add if the poster has blocked you! It is exactly as nonsense as you think.

    Example:

    I made a post in testing@piefed.social from my account testingpiefed@piefed.social, replied to it from my other testingpiefed@piefed.zip account. Since the .social account has blocked the .zip, it doesn’t show up on .social, nor on e.g. piefed.europe.pub.

    I then made a comment from my lemmy.ml account, and replied to it from my piefed.zip account, and neither .social, nor europe.pub can see my .zip reply, but can see my lemmy.ml comment!

    [ Let me add more clarity here: what this feature does is two things. On a local instance, if you block someone who is on your instance, they cannot reply to you. However, this condition is not federated (yet, it would seem), and so, to get around this “issue”, the system will drop comments from being stored in the PieFed database IF the blocked user is remote. This means you end up with “ghost comment chains” on remote instances. There is NEW code as of a few weeks ago, that will send an AUTOMATED mod action against blocked remote users to remove the comment. So long as the community is a local PieFed community, it will federate that mod action to the remote server, removing the comment automatically. For PieFed servers, eventually, they would rather federate the users block list (that’s fair), but it would seem this code to send automated mod actions to remove comments due to user blocks is going to stay just for the Lemmy Piefed interaction. I don’t really understand why the system simply doesn’t prevent the rendering of the comment, instead of stopping it from being stored. It knows the user is blocked, it already checks it, it should then just stop rendering the chain of comments for the given user, prevent notifications from those users, etc. ]

    But wait! There’s More!

    • PieFed defederates from Hexbear.net, Lemmygrad.ml, and Lemmy.ml out of the box.
    • The “rational discourse” sidebar that you see on the main instance is hard coded into the system.
    • Moderators of a community can kick you from a community, which unsubscribes you from it, and does not notify you.
    • I was going to say that Admins had the ability to add a weight to votes coming from other instances, but the videos that showed this are now gone, and as of v1.5.0 they have removed the instance vote weight feature, claiming it was “unused”.

    All this to say. Piefed is a silly place, and no one should bother using its software.

    • reksas@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      0
      ·
      18 hours ago

      Trying to do something about bots is okay. “attitude” is iffy but still kind of understandable, though already a step in worrying direction. But surely its implemented in transparent and fair way… right? Actively lying to users so they cant use images that MIGHT have content coder doesnt like? What else are they lying about? What else WILL they lie about? And that it reduces your reputation while not even informing you about it?

      It doesnt matter if your ideals are noble and intentions good, if you dont act with integrity you are no better than the ones who are making world shitty place.

    • TyrantTW@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      23 hours ago

      Holly cow, this code looks like it was written by my student self. It’s actually kind of cute ngl

    • SorteKanin@feddit.dk
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 day ago

      … Wow. I mean I already knew there was some questionable stuff with PieFed but this is honestly next level.

        • SorteKanin@feddit.dk
          link
          fedilink
          English
          arrow-up
          0
          ·
          19 hours ago

          No just the whole thing. It seems sort of extreme to do all this stuff in the code. This is not something the software should have inbuilt if you ask me.

          • Skavau@piefed.social
            link
            fedilink
            English
            arrow-up
            0
            ·
            19 hours ago

            Why? Much of it is orientated around giving admins tools to deal with trolls/spammers/AI posters. An alert system.

            • HiddenLayer555@lemmy.ml
              link
              fedilink
              English
              arrow-up
              0
              ·
              12 hours ago

              Lol y’all complain about Lemmy being authoritarian but think this is fine?

              Starting to think what you actually disagree with is the political opinions of the Lemmy devs, not the “authoritarian” tactics themselves.

              • Skavau@piefed.social
                link
                fedilink
                English
                arrow-up
                0
                ·
                12 hours ago

                This is just something piefed.social has, not all. Rimu dislikes 4chan culture heavily.

                • HiddenLayer555@lemmy.ml
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  12 hours ago

                  Oh please if Lemmy had that hard coded you would absoluutely not be defending it. Even if it was just .ml you’d still use it to smear all of Lemmy. I hate 4chan too, but this is still by definition a very heavy handed imposing of one’s personal opinion on others and limiting expression but somehow it doesn’t get the authoritarian label. Wonder why.

            • SorteKanin@feddit.dk
              link
              fedilink
              English
              arrow-up
              0
              ·
              18 hours ago

              I feel like you’re moving from moderation to sort of oppressive or authoritarian territory once you’re literally building a social credit system into your software. If you want that, sure use PieFed. I don’t want that, so I won’t.

              • lambalicious@lemmy.sdf.org
                link
                fedilink
                English
                arrow-up
                0
                ·
                10 hours ago

                Ironic how piefed defederates from lgml and lml by default, yet implements CCP-style and CCP-vibe content and behaviour moderation.

              • Skavau@piefed.social
                link
                fedilink
                English
                arrow-up
                0
                ·
                18 hours ago

                So the reputation system. I’ll see if Rimu can be talked into making it instance level.

                But its function is primarily to just catch out trolls and spammers. Make them more visible to admins.

                • ZombiFrancis@sh.itjust.works
                  link
                  fedilink
                  English
                  arrow-up
                  0
                  ·
                  15 hours ago

                  It seems the chief complaint people have about Lemmy going to Piefed are how admins operate their instances. Not sure any of this will change that, or even help.

                  Not to mention all these are just a game for trolls and spammers to tool around with. Like: Up/downvotes were built before vote manipulation became a problem.

                  This stuff is the difference between building a bridge and governing who crosses it.

                  • Skavau@piefed.social
                    link
                    fedilink
                    English
                    arrow-up
                    0
                    ·
                    15 hours ago

                    Its not vote manipulation as such here. Its much simpler than that. Lemmy has a spam problem. People coming in to just make shill communities selling a service or product or spamming advert posts across communities.

                    They usually get downvoted, but I can use Piefeds admin tools to filter for downvoted posts by new accounts. This usually catches most spammers like that. I can then ban them from piefed.social and pass that on to Lemmy admins.

                    A lot of Day 1 trolls are caught like this too.

        • raspberriesareyummy@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          23 hours ago

          Would that really be worse? Considering they are using an fucking image-to-text-converter… I don’t think it would. Also, regular expressions rule :) just not in this context.

    • QuizzaciousOtter@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      Wow, thanks for posting this. I actually considered switching to PieFed because people say a lot of good things about it but now I know I won’t. I can’t treat codebase like this seriously.

      • reksas@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        0
        ·
        18 hours ago

        i already had made another account there. Now i deleted it. The ui was already kind of dumb there, this was the last straw. Or last haybale rather.

        • lambalicious@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          0
          ·
          10 hours ago

          How do you find out what instances have it enabled or disabled tho? And is there a published code of conduct / long-term committments on whether instances will change their minds about that at some point?

    • whimsy@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      Wow, great post. I was mildly annoyed by all the piefed shenanigans from non compliance with activitypub but this really is quite eye opening

      • RedWizard [he/him]@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 hours ago

        Yeah I don’t understand why the project can’t conform to the AP standards. I get the desire to have a blocking feature that’s more robust than just a cosmetic feature. One that actually prevents a user from replying. But they way they’ve gone about it obviously isn’t it. Creating ghost comment chains on other AP services is not good.

    • [object Object]@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      Piefed has code to explicitly fuck over Sxan or what’s their name, by replacing the thorn character with ‘th’. Meaning you can’t properly cite Old English, Old Norse, or modern Icelandic on Piefed. But of course, “Lemmy is the authoritarian communist platform”.

      Piefed’s code also reeks of a recent college graduate, being a stream of consciousness with almost no comments. Meanwhile the most known, and seemingly most active dev claims twenty-five years of experience, making one wonder if they learned anything in that time.

      • RedWizard [he/him]@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        10 hours ago

        They did roll this back after people got annoyed with the change. The fact that it was added at all though is very silly! Why should it matter to the project maintainer what some user is doing? Why build a community on a platform that is going to inject such a wildly silly opinion on you? If you don’t think EM Dashes are an issue, you have no choice but to be endlessly pinged every time an EM Dash is detected by the system if you’re a community admin.

        • samus12345@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 day ago

          Ostensibly they do it to interfere with AI scraping social media comments, but of course it does nothing but make their comments more difficult to read.

          • lambalicious@lemmy.sdf.org
            link
            fedilink
            English
            arrow-up
            0
            ·
            10 hours ago

            Like, how? It’s perfectly readable (even as an ESL can do it without issues, for one). And honestly it’s a goof bit of flavour. Like using ß for things like aßhole, although San’s choice has the advantage that it is actually part of Ebglish.

            • samus12345@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              0
              ·
              8 hours ago

              WAS part of English. It’s archaic now, and therefore not natural for me to read. I do like the use of the ß, but it’s more familiar to me than to most English speakers since I lived in Germany for 10 years.

      • Blaze (he/him)@piefed.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 days ago

        Piefed has code to explicitly fuck over Sxan or what’s their name, by replacing the thorn character with ‘th’.

        This has been removed

        • [object Object]@lemmy.world
          link
          fedilink
          English
          arrow-up
          0
          ·
          2 days ago

          Ok. But other people can think about their doings in advance and foresee the consequences. Piefed’s development is not how a mature person with ‘twenty-five years of experience’ makes open-source software.

    • Postimo@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      Phew, well thank goodness all the users are safe from authoritarian red fascist code!

    • wjs018@piefed.wjs018.xyz
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      I know the blocking stuff is actively being worked on as we aren’t happy with it yet. However, that is an issue where it would be literally impossible for every user to be happy with whatever end state it results in. That is an area where the different software platforms can offer people different experiences so that they can seek out the type of experience they are looking for.

      Almost everything else you listed here can be turned on/off by an admin. I didn’t know about the 8-character username thing, probably worth revisiting that. The downvotes being disabled with low attitude is one I don’t see being removed, but could be an admin-set threshold (or disabled) in a future version. In fact, I suspect that the formula was written this way to make the threshold more well bounded instead of a simple up - down calculation.

        • Considering what wjs018 said, I now suspect the users I’ve seen it on just added the symbol in their display name like a badge of honor, like how mine is all emojis. Which is what I thought before seeing this thread initially.

          And I use Connect.

      • wjs018@piefed.wjs018.xyz
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 days ago

        If you are seeing those on lemmy or in a different client than the web ui, that would have to be something else. The red triangles don’t federate at all, nor are they in the api, they are just based on the local content of a user on that instance.

      • plyth@feddit.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 day ago

        lol hardcoded shit everywhere

        It’s open source. Why not? People who want a configuration menu can create a patch.

        • expr@programming.dev
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 day ago

          Just because code is open source doesn’t mean shit code can’t be called out. Shit code is shit code.

          • plyth@feddit.org
            link
            fedilink
            English
            arrow-up
            0
            ·
            24 hours ago

            But why is hardcoding shit code for open source code? The code is easier to read because no if or switch statements are needed to distinguish between the options. No configiration menu has to be maintained.

        • BB84@mander.xyz
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 day ago

          I didn’t downvote your comment. But let me argue anyway.

          Lots of people flock to PieFed because it is not made by the Lenmy devs who are unpalatably heavy handed in their “moderation” on the ml instance. One would hope this means PieFed offers more freedom to use the software how you like. So it’s funny that it’s even stricter “moderation” AND NOW ITS HARDCODED so it affects every instance.

          • lambalicious@lemmy.sdf.org
            link
            fedilink
            English
            arrow-up
            0
            ·
            10 hours ago

            So it’s funny that it’s even stricter “moderation” AND NOW ITS HARDCODED so it affects every instance.

            Lol, people so afraid of Lemmy devs bowing to the CCP that they migrate to the fediverse option that actually implements CCP societal control features. McCarthysim really did a number on the Amerikkkan brain, dunno if it is impacting people from elsewhere that much. This surely was not in my 2026 Bingo card!

          • plyth@feddit.org
            link
            fedilink
            English
            arrow-up
            0
            ·
            23 hours ago

            ITS HARDCODED so it affects every instance.

            It’s open source. Every instance can change it and if something is common, people can maintain the patch together.

            Lenmy devs who are unpalatably heavy handed in their “moderation” on the ml instance.

            Which is their instance. I don’t like the hate they receive. They have established a social network that allows everybody to run their own instance with their own moderation. To present them as the villains must be nurtured by the establishment.

            So it’s funny that it’s even stricter

            Absolutely

    • magiccupcake@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 days ago

      Every user (remote or local) has an “attitude” which is calculated as follows: `(upvotes cast - downvotes cast) / (upvotes + downvotes)`. If your “attitude” is < 0.0 you can’t downvote.

      This pains me because it is functionally equivalent to

      If downvotes < upvotes
      
      • Skavau@piefed.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 days ago

        For example, you cannot cast a vote on PieFed if you’ve made 0 replies, 0 posts, AND your username is 8 characters long:

        I don’t see a problem here. This is oddly specific, but it’s rooted in anti-downvoting spam.

        If a reply is created, from anywhere, that only contains the word “this”, the comment is dropped (CW: ableism in the function name):

        There is a setting to turn that on or off at https://piefed.social/admin/misc, “Filter out comments that are simply a form of this”

        Every account has a Social Credit Score, aka your Reputation. If your account has less than 100 reputation and is newly created, you are not considered “trustworthy” and there are limitations placed on what your account can do. Your reputation is calculated as upvotes earned - downvotes earned aka Reddit Karma. If your reputation is at -10 you also cannot downvote, and you can’t create new DMs. It also flags your account automatically if your reputation is to low:

        I don’t see why this is so inherently onerous to you in principle. Trolls/spammers etc are serious problems on sites like Lemmy and Piefed. If you’re a new account and you’ve managed to get -100 reputation that quickly, it’s not a good sign. If and as the Fediverse grows, instance owners are going to need more observation tools to catch this type of stuff.

        This is the default detection, apparently you can use an API endpoint for that detection as well apparently, but it’s not documented anywhere but within the code.

        The AI detection is going to be poor. But I’ve seen a lot of AI posters right now caught through this. use of the em-dash is very much a sign, unfortunately. It doesn’t ban them by the way. It just flags new accounts doing it to admins.

        As Edie mentioned, if someone has a user blocked, and that user replies to someone, their comment is dropped:

        If every instance was Piefed, you simply wouldn’t be able to reply to anyone who has blocked you. “Reply” is essentially faded out. The difference is that Lemmy doesn’t implement the block function in the same way, so Piefed just throws out replies by blocked users to the person who has blocked them coming from Lemmy. That’s the mismatch at play here.

        If you can somehow still reply via a Piefed instance, it is bugged and not working as intended.

        PieFed defederates from Hexbear.net, Lemmygrad.ml, and Lemmy.ml out of the box.

        This can be turned off. It also defederates from hilariouschaos and others.

        And no, it does not defederate from lemmy.ml out of the box. You are completely misunderstanding that code. I have already addressed this here.

        "Alright, it doesn’t do any defederation, this function just controls what the api reports. It will list which of those four instances the instance is defederated from but that doesn’t look like it is actually used anywhere to do something…let me grab you links here is where piefed digests this api endpoint to populate the instance_chooser table, and the defed_list field isn’t actually used at all

        Moderators of a community can kick you from a community, which unsubscribes you from it, and does not notify you. This has been removed actually, the API endpoint is still there.

        It has been scrubbed, but it also never really functioned in the first place.