this post was submitted on 24 May 2024
165 points (100.0% liked)

Programmer Humor

856 readers
6 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 5 comments
sorted by: hot top controversial new old
[–] morrowind@lemmy.ml 15 points 10 months ago (2 children)

What am I looking at here?

[–] ImplyingImplications@lemmy.ca 39 points 10 months ago

There's a string stating that the code should not be passed or the employee will be fired. I'd assume this was a test to see if an employee meant to be doing code review was actually doing them. Spoiler, they were not, as OP said they found this in production code.

[–] palordrolap@kbin.social 3 points 10 months ago (1 children)

My guess is a "solution" to the age-old problem of needing to store a secret in a file that the user can download, thus making the entire system insecure.

This "solution" appears to be either that the string itself is so outrageous that the user would not believe that it's the real secret when it is in fact the real secret, leveraging security through obscurity, or else it's there in place of the real secret that cannot be revealed under pain of ~~death~~ firing, and therefore is accidentally being used instead of that intended secret... so it's not secret after all.

Unless they're doing something incredibly clever to substitute that secret string for the real thing when the time is right and doing it in such a way that the user can't intercept, someone's getting fired.

[–] dev_null@lemmy.ml 2 points 10 months ago

No, it's not. It's part of React internals that you shouldn't use because your app will break. It's a warning for developers using React. It's not a secret of any kind.

[–] dean 10 points 10 months ago