this post was submitted on 16 Nov 2024
23 points (100.0% liked)

Programmer Humor

27853 readers
491 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] trustnoone@lemmy.sdf.org 4 points 1 year ago (12 children)

I have an apostrophe and it's super annoying as some companies see it as a SQL injection hack and sanitize it.

So I've received ID with Mc%20dole or they add a space in it. Or I'll get a work email with an apostrophe but I cant use it anywhere because sites have it disabled. And I've missed my flight because I changed my ticket once to add the apostrophe and the system just broke at the gate.

Worse yet many flight companies have "you will not be able to board if your ID doesn't exactly reflect your details" but their form doesn't allow it. Even most forms for card payments don't allow it even though it's the name on my card.

[–] MirthfulAlembic@lemmy.world 5 points 1 year ago (1 children)
[–] JohnEdwa@sopuli.xyz 2 points 1 year ago* (last edited 1 year ago)

There's also the version with examples if you want to know exactly what and why it breaks.

And the git that collects all of these in one place, if you want to really nerd out.

[–] agilob@programming.dev 3 points 1 year ago* (last edited 1 year ago) (1 children)

I have an apostrophe and it’s super annoying as some companies see it as a SQL injection hack and sanitize it.

My surname contains a character that's only present in the Polish alphabet. Writing my full name as is broke lots of systems, encoding, printed paperwork and even British naturalisation application on Home Office website. My surname was part of my username back at uni, and everytime I tried to login on Windows, it would crash underlying LDAP server, logging everyone in the classroom out and forcing ICT to restart the server.

[–] grue@lemmy.world 2 points 1 year ago

everytime I tried to login on Windows, it would crash underlying LDAP server, logging everyone in the classroom out and forcing ICT to restart the server.

Now that's the way to do it! Make it everybody's problem, not just yours.

[–] rekabis@lemmy.ca 2 points 1 year ago

I have an apostrophe

Scottish/Irish?

some companies see it as a SQL injection hack and sanitize it.

Which kind of apostrophe?

A straight apostrophe, fine - that can and does get used in valid SQL injection attacks. I would be disgusted at any input form that didn’t sanitize that.

But a curly apostrophe? Nothing should be filtering a curly apostrophe, as it has no function or use within SQL. So if you learn how to bring that up in alt codes (Windows, specifically), Key combos (Mac) or dead keys (Linux), as well as direct Unicode codes for most any Win/Mac/*Nix platform, you should be golden.

Unless the developer of that input form was a complete moron and made extra-tight validation.

Plus, knowing the inputs for a lot of extended UTF-8 characters not found on a normal keyboard is also a wee bit of a typing superpower.

[–] AdNecrias@lemmy.pt 1 points 1 year ago (1 children)

%20 is encoded space if I remember right, so even then they were already incorrect

[–] AlecSadler@sh.itjust.works 1 points 1 year ago

It sounds like maybe they sanitized the apostrophe to a space and then encoded it

[–] Treczoks@lemmy.world 1 points 1 year ago

Same shit with American custom forms. On the one hand, they threaten you with Armageddon if you fill out the form incorrectly, on the other hand, they only allow plain letters, numbers, and a handful of special characters. Nobody there has the capacity of the mind that maybe a name cannot be correctly represented with that tiny subset of characters. So it is simply impossible to fill out that form without breaking the law. And it is a customs form, so they should know that people filling it out are most likely foreigners.

[–] someguy3@lemmy.world 1 points 1 year ago* (last edited 1 year ago) (1 children)

you will not be able to board if your ID doesn't exactly reflect your details"

Do they care about an apostrophe though? I can see any punctuation being a problem for systems.

[–] pmk@lemmy.sdf.org 2 points 1 year ago (4 children)

I had to convince people to let me on board a plane because my name contain a swedish letter (å). Their computer system translated it into "aa", which then didn't match my passport.

[–] someguy3@lemmy.world 1 points 1 year ago* (last edited 1 year ago) (1 children)

That one I can actually see, having an extra letter that doesn't match. Dropped punctuation or symbols (whatever the flair is called) though personally I wouldn't care.

[–] wieson@feddit.org 1 points 1 year ago (1 children)

That's the wrong way of looking at an å.

It's not just an a with decoration. It actually has different pronunciation and is typically replaced with aa if no å is available. (I'm neither Swedish nor Norwegian, so not 100% sure, but it's what happened to Erling Haaland).

Similarly, you would replace a German ä with ae. So if my name was Bäcker, it would be wrong to spell it Backer on a ticket. Baecker would be the way.

[–] someguy3@lemmy.world 1 points 1 year ago* (last edited 1 year ago) (1 children)

Yes I'm aware it's not an a with decoration jfc. I'm saying for computer entries that garble things, I wouldn't care about matching it up so perfectly (with dropped whatever those things are called) as to not allow someone to board a plane.

[–] Hawke@lemmy.world 1 points 1 year ago

“Diacritics” is the word you are looking for.

And unfortunately the kind of people who decide whether people get to board a plane do care about that stuff.

load more comments (3 replies)
load more comments (6 replies)
[–] SlopppyEngineer@lemmy.world 4 points 1 year ago (1 children)

"We call her Carrie, because of the carriage return."

You can also try to give the child NULL as middle name for additional fun.

[–] morgunkorn@discuss.tchncs.de 4 points 1 year ago* (last edited 1 year ago) (3 children)
[–] bravesilvernest@lemmy.ml 2 points 1 year ago (2 children)

I just realized that the shitty software on the other side of the divide is casting null to ”null", which absolutely explains that issue. What a cluster

[–] Ephera@lemmy.ml 1 points 1 year ago

Yeah, I love to rag on languages with weak typing, because of the potential for a bug, but seeing it play out in reality, directly with user input, that's certainly something else.

[–] kernelle@lemmy.world 1 points 1 year ago

shudders in NodeJS

[–] neanderthal@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

He is being too nice. He needs to get a lawyer and sue that shitty company for harassment and whatever else.

ETA: The US isn't overly litigious. We are under litigious if anything.

[–] grue@lemmy.world 1 points 1 year ago

Oh no, it gets worse:

Prank or not, Tartaro was playing with fire by going with NULL in the first place. “He had it coming,” says Christopher Null, a journalist who has written previously for WIRED about the challenges his last name presents. “All you ever get is errors and crashes and headaches.”

Archive link: https://archive.ph/o/Foe1r/https://www.wired.com/2015/11/null/

[–] Bookmeat@lemmy.world 3 points 1 year ago* (last edited 1 year ago) (1 children)

Not legal in Canada. Your legal name must use Latin characters only. This is a sore point for indigenous people.

load more comments (1 replies)
[–] sxan@midwest.social 2 points 1 year ago (1 children)

There are a frightening number of systems that don't allow "-", which isn't even an edge case. A lot of people - mostly women - hyphenate their last names on marriage, rather than throw their old name away. My wife did. She legally changed her name when she came of age, and when we met and married years later she said, "I paid for money for my name; I'm not letting it go." (Note: I wasn't pressuring her to take my name.) So she hyphenated it, and has come to regret the decision. She says she should have switched, or not, but the hyphen causes problems everywhere. It's not a legal character in a lot of systems, including some government systems.

[–] Affidavit@lemm.ee 1 points 1 year ago (1 children)

It boggles my mind how so many websites and platforms incorrectly say my e-mail address is 'invalid' because it has an apostrophe in it.

No. It is NOT invalid. I have been receiving e-mails for years. You just have a shitty developer.

[–] rumba@lemmy.zip 1 points 1 year ago (4 children)

worst thing is, the regex to check email has been available for decades and it's fine with apostrophies

[–] Ephera@lemmy.ml 1 points 1 year ago (1 children)

Well, and remember: If in doubt, send them an e-mail. You probably want to do that anyways to ensure they have access to that mailbox.

You can try to use a regex as a basic sanity check, so they've not accidentally typed a completely different info into there, but the e-mail standard allows so many wild mail addresses, that your basic sanity check might as well be whether they've typed an @ into there.

[–] rumba@lemmy.zip 1 points 1 year ago (1 children)

The regexes are written to comply with RFC 5332 and 6854

They are well defined and you can absolutely definitively check whether an address is allowable or not.

https://datatracker.ietf.org/doc/html/rfc5322

load more comments (1 replies)
load more comments (3 replies)
[–] Busyvar@jlai.lu 2 points 1 year ago (1 children)

Frontend devs hates this guy.

[–] ArtVandelay@lemmy.world 1 points 1 year ago

Still better than Jennifer Null I guess

[–] lime@feddit.nu 2 points 1 year ago* (last edited 1 year ago) (1 children)

asking questions like this is how i found out that one of the allowed characters in names in my country is ÿ, which is fine in Latin-1 but in 7-bit ASCII is DEL.

[–] Whelks_chance@lemmy.world 2 points 1 year ago (2 children)

This sounds like it would create a whole list of fun and irritating edge conditions for some poor bugger to debug. Love it.

load more comments (2 replies)
[–] aarRJaay@lemm.ee 2 points 1 year ago

Ask Robert'); DROP TABLE Students; 's mum how it went.

[–] drew_belloc@programming.dev 1 points 1 year ago (1 children)

That's easy, just call it Jhon\nDoe

[–] riodoro1@lemmy.world 1 points 1 year ago (2 children)

John\0Doe will fuck with all C (and C based derivatives) software that touches it.

[–] pelya@lemmy.world 1 points 1 year ago

Nah, it will end up simply as "John" in the database. You need "John%sDoe" to crash C software with unsafe printf() calls, and even then it's better to use several "%s"

[–] xmunk@sh.itjust.works 1 points 1 year ago (1 children)

C and C derivatives will be fine unless they're fucking up encoding.

[–] AnUnusualRelic@lemmy.world 1 points 1 year ago

Which rarely, if ever, happens. Especially with US software.

[–] erayerdin@programming.dev 1 points 1 year ago

"ethics aside" truly a starter for a qa

[–] chaitae3@lemmy.world 1 points 1 year ago

Apparently no-one did it yet, so I'll name my child +++ATH0

[–] iAvicenna@lemmy.world 1 points 1 year ago

why settle for \n when you can go for the stylish carriage return

C programmers would ask whether a null-terminated name would be acceptable

load more comments
view more: next ›