this post was submitted on 21 Aug 2026
439 points (99.5% liked)

Software Gore

6572 readers
636 users here now

Welcome to /c/SoftwareGore!


This is a community where you can poke fun at nasty software. This community is your go-to destination to look at the most cringe-worthy and facepalm-inducing moments of software gone wrong. Whether it's a user interface that defies all logic, a crash that leaves you in disbelief, silly bugs or glitches that make you go crazy, or an error message that feels like it was written by an unpaid intern, this is the place to see them all!

Remember to read the rules before you make a post or comment!


Community Rules - Click to expand


These rules are subject to change at any time with or without prior notice. (last updated: 7th December 2023 - Introduction of Rule 11 with one sub-rule prohibiting posting of AI content)


  1. This community is a part of the Lemmy.world instance. You must follow its Code of Conduct (https://mastodon.world/about).
  2. Please keep all discussions in English. This makes communication and moderation much easier.
  3. Only post content that's appropriate to this community. Inappropriate posts will be removed.
  4. NSFW content of any kind is not allowed in this community.
  5. Do not create duplicate posts or comments. Such duplicated content will be removed. This also includes spamming.
  6. Do not repost media that has already been posted in the last 30 days. Such reposts will be deleted. Non-original content and reposts from external websites are allowed.
  7. Absolutely no discussion regarding politics are allowed. There are plenty of other places to voice your opinions, but fights regarding your political opinion is the last thing needed in this community.
  8. Keep all discussions civil and lighthearted.
    • Do not promote harmful activities.
    • Don't be a bigot.
    • Hate speech, harassment or discrimination based on one's race, ethnicity, gender, sexuality, religion, beliefs or any other identity is strictly disallowed. Everyone is welcome and encouraged to discuss in this community.
  9. The moderators retain the right to remove any post or comment and ban users/bots that do not necessarily violate these rules if deemed necessary.
  10. At last, use common sense. If you think you shouldn't say something to a person in real life, then don't say it here.
  11. Community specific rules:
    • Posts that contain any AI-related content as the main focus (for example: AI “hallucinations”, repeated words or phrases, different than expected responses, etc.) will be removed. (polled)


You should also check out these awesome communities!


founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] balsoft@lemmy.ml 11 points 1 day ago* (last edited 1 day ago) (1 children)

That's just awful security practices. You must not replace proper code/data separation with user input sanitization. If you are just pulling names from a database and inserting them into your DOM directly you're doing things majorly wrong and half your codebase probably needs rewriting from scratch.

If your stack does not support code/data separation, you should escape at the point of use/point of interface with other software, not at the point of user data entry.

You should not "sanitize" something as personal as a name. It is up to the individual to identify themselves as they see fit, whether it is some weird legal name or just how they want to present. For every "rule" about names you can think of, there will be an exception somewhere.

In fact, even splitting up the name field into "first name" and "last name" is already wrong. It should just be "name". If you need there to be a separate "first name" and "last name" for some reason (e.g. an external system which requires it), allow leaving either one as empty. Bonus points if you have independent "legal name" and "how would you like to be called" fields.

Getting rid of excess whitespace is fine aswell as it does not change the name

As a responsible developer you must not assume this. Especially if your software interacts with other systems. You never know what dumb shit some other system has got up to, maybe a clerk somewhere accidentally entered someone's name with a space and that person desperately needs to use your software while they're getting things fixed.

As an immigrant, I have been personally strongly inconvenienced by user input validation very often. For example, a tax agency system (which has my passport number recorded with a space) rejected automatic declarations from my bank (where the system did not allow spaces in the passport number) so I had to fill my tax declarations manually for a while. Or my bank rejecting bills from the water utility because the utility's system required entering two surnames, and I only have one, so they just put it in there twice. The amount of services which reject my pretty normal-looking self-hosted email address with "enter a valid email address" (presumably it must end in @gmail.com or @outlook.com) is staggering. This kind of bullshit is widespread and it needs to stop. You as a developer don't know better than the person entering the data about themselves.

[–] Pieisawesome@lemmy.dbzer0.com 5 points 23 hours ago

100% this.

So many places do these things wrong and just make wild assumptions based on their limited PoV.

I just spent a month adding international phone, name, and postal code support to a legacy app at my job.

They weren’t even consistent with their enforcement inside of the app.

Don’t add validation for anything unless you understand 100% of the cases. You should use premade libraries or tools in most cases because you will do it incorrectly.

The rules around passwords are equally as dumb