this post was submitted on 02 Jan 2024
640 points (99.5% liked)

Programmer Humor

32380 readers
1370 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 14 comments
sorted by: hot top controversial new old
[–] [email protected] 105 points 10 months ago (2 children)

Whoops, the mask slipped and we all saw the bot behind it.

[–] [email protected] 3 points 9 months ago

I think there's a second mask. Who sends oops wrong person in the same text message?

[–] [email protected] 1 points 10 months ago

Mask slipped? The bot saw a person speak code and was like l, rips off mask Comrade!

[–] [email protected] 74 points 10 months ago

Thought that seemed really cute. Nice way to try to break through social anxiety.

Then I saw that it started as a wrong number message. Then I realised…

Damn scam bots!

[–] [email protected] 50 points 10 months ago

Modern version of this will be ChatGPT jailbreak messages

[–] [email protected] 40 points 10 months ago

In the future, bots are going to get so annoyed with people pretending to be bots when they just want to talk to other bots!

[–] [email protected] 35 points 10 months ago (2 children)

How does this exploit work? I understand that inputs were not sanitized, but what did the injected code do?

[–] [email protected] 51 points 10 months ago

My guess would be the response text is passed through a rudimentary templating engine that looks for { and }. Somehow it must be processing the whole chat history. The templater fails at the unexpected braces in the code block and then just gives up (probably a try-catch ignores the error and sends the message anyway).

[–] [email protected] 37 points 10 months ago* (last edited 10 months ago)

I don't think the code is doing anything, it looks like it might be the brackets.

That effectively the spam script has like a greedy template matcher that is trying to template the user message with the brackets and either (a) chokes on an exception so that the rest is spit out with no templating processor, or (b) completes so that it doesn't apply templating to the other side of the conversation.

So { a :'b'} might work instead.

[–] [email protected] 3 points 10 months ago (1 children)

Remember, always validate your inputs.

[–] [email protected] 3 points 10 months ago (1 children)

Little Bobby Tables we call him.

[–] [email protected] 2 points 10 months ago (1 children)
[–] [email protected] 2 points 10 months ago

They had to change the law in the uk around naming companies!

[–] [email protected] 2 points 9 months ago

This is the best thing ive seen this week!