
deliberately misleading error message.
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 contentIf 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 FalseEvery 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 earnedaka 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 FalseYup. If your image contains the word
Anonymous, and contains the textNo.orN0it 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 thecurrent_user.reputation -= 1PieFed 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 adminThis 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 FalseI’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 NoneFor Example:
- Cowbees comment on lemmy.ml: https://lemmy.ml/post/41587312/23288779
- Non-existent on piefed.social: https://piefed.social/comment/9647830
(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.This has been removed actually, the API endpoint is still there.- 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.
lol hardcoded shit everywhere. that codebase is so bad it’s entertaining. you should make a standalone post about this here and crosspost to !programming_horror@programming.dev
lol hardcoded shit everywhere
It’s open source. Why not? People who want a configuration menu can create a patch.
Downvoters, do you have an argument? What is it but entitlement to demand that free open source software should be written differently from what the programmer wants?
Just because code is open source doesn’t mean shit code can’t be called out. Shit code is shit code.
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.
Open source just means people are free to edit it and distribute their changes. Hardcoding things like this is bad practice no matter if it’s open source or not. It’s not maintainable. Maintainable as in easily maintainable, I.e., configuration files not code edits.
That if chain is horrendous. You should have a config json file with an array of links and then use a for and check for each of them.
The advantage of having a config file is that it’s easily for others to see everything that can be changed dynamically without touching the code, and it’s much easier to maintain forks that change or extend the configurable behaviour.
Hard coding shit is bad because it’s actually harder to maintain. No programmer worth their salt has difficulty checking the json file that has the configuration for X list, hard coding an if chain is bad coding.
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.
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!
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
That isn’t how it works. They would have to FORK the code and maintain their changes going forward with every update. That is poor software development practices no matter how you look at it.
I think the Brave browser does it with Chrome. Wouldn’t the source control tool do most of the maintenance?
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 (or if they count from when they’ve typed up some Logo at three years old).
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.
Piefed has code to explicitly fuck over Sxan or what’s their name, by replacing the thorn character with ‘th’.
This has been removed
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.
Lemmy recently removed a feature using lemmy.ml as a source of truth for federated communities: https://lemmy.ml/comment/23400094
All Fediverse developers make mistakes.
That feature was part of the development version, and never meant to be included in any official release.
The snippet that does this is:
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(Link in the post body)
current_user.reputation -= 1
So what exactly is going on there?
Piefed punishes users for wrong think/not acting like the creator wants
Also fun fact, you can probably upload it to most other piefed instances just fine.
rimu has pretty strong opinions on social media. This filter is optional and can be turned on/off by an admin. Some of my contributions to piefed have been to make filters or features that are strongly opinionated like this optional. For piefed.social specifically though, rimu has all of them on because that is his instance and he runs it the way he wants.
I’m not entirely against banning 4chan content (as you said, it’s his instance), but I think doing it this way is sloppy at best, and deceptive at worst.
I don’t necessarily disagree. I haven’t really taken a close look at how this is implemented, but it also hasn’t really been a high priority to revisit, at least not for me. There are still plenty of more fundamental features to get right first in my opinion. The big one I have worked on for the next piefed version is to get local sticky posts working for example.
My experience from working with rimu though is that he has been pretty receptive with contributions to make it less opinionated in these kinds of ways. I have removed or made optional tons of stuff that he spent time coding and I haven’t really gotten any pushback from him over it. I know it kind of makes me sound like a douche to just say open a PR, but if somebody out there feels strongly about this filter, that is probably the fastest way to get it changed.
Interesting. If this is intentional, it could be easy to change. Maybe I’ll take a look at the code tomorrow and see if I can change it
I mean okay sure, you can disable these things. But the fact that they are enabled out of the box in the software as written is a huge red flag.
I’m sure you will be pleased to know that the filter this post is about and most of the others mentioned in this thread are, in fact, off by default.
Yeah, it speaks to the developer having a philosophy that is really at odds with the concept of open communication. I’m no free speech absolutist, but some of these restrictions are just ridiculous.
the filter this post is about and most of the others mentioned in this thread are off by default.
How do I know whether my instance has these filters applied or not? And if rimu is putting “deliberately misleading error messages”, how can I be sure of anything?
I’m on your instance. I never encountered any of the filters mentioned in this thread.
You can always the details on !home@piefed.zip to be sure, the admins are quite reactive.
I was hoping to see a page with the list of instance rules. Mastodon and PixelFed seem to have one.
Yeah, as a developer if you ever catch yourself thinking “my software should lie to the user”, probably take a step back and reconsider.
I guess that’s just something we have to grow to expect from Rimu, after the whole þ fiasco? I can think of lots of valid image uses that have the world “anonymous”, such as semi-redacted whistleblowing posts.
the whole þ fiasco
That has since been removed. Yeah, rimu is certainly opinionated and passionate about what he believes in, but has also been pretty receptive to feedback, both from users and from admins (like in the private voting case). Fortunately, there are alternative threadiverse platforms out there for people that want them. Both lemmy and mbin do some stuff better than PieFed, and that’s ok. The different projects have maintained working relationships at the dev level to try to make sure interoperability outside the base activitypub spec doesn’t completely break (the post-moving feature/FEP was a collaboration between PieFed, lemmy, and NodeBB for example).
That’s certainly good to hear. But still, it’s worth to be cautious around.
Thorn fiasco?
Iirc, a thing was added that converted the thorn character to a th because some user was annoying everyone by using thorns instead of ths.
No, not because a user was annoying everyone else. Because the developer seemed to have a personal beef against people who commit the crime of [*checks notes*] not behaving neurotypically on the internet, and went on to impose a collonialistic, imperialistic punishment (censoring of national language) on them. See: Spain vs. Cataluña.
This is a really dramatic observation. The user did it specifically, if I recall, to try and evade AI detection or something.
It’s also amusing because said user itself is literally on a piefed instance.
They thought it poisoned llms (it didn’t, and they ignored people who mentioned it). Not to evade any ai thing.
That sounds like a great feature ngl
Indeed, Icelanders shouldn’t be allowed to use their language on fediverse. English only or gtfo.
For every that doesn’t understand what this is about.
They are trying to filter content from 4chan
The images you upload gets scanned. If they contain the words “anonymous” it checks if it also contains “no.” And if it does it assumes its from 4 chan and then deliberately serves a misleading error.
I love that the piefed creator came here only to say he’ll yeah it does that and fucked off without acknowledging how terrible of a design it is
If anyone has more ideas for how to frustrate and deceive fascists (and their enablers) please let me know.
What are you talking about?
I’m curious who are considered the enablers before able to answer that
Edit, interesting no response here to the question












