Skip to content
DevMeme
3389 of 7590
Security Post #3722 · source on Telegram

Anakin discovers the dark side of password management

Description

A four-panel meme using the 'For the better, right?' format with Anakin Skywalker and Padmé Amidala from Star Wars. In the first panel, a proud Anakin says, 'I configured the database to store login passwords!'. In the second panel, a smiling Padmé replies, 'You mean the salted hash, right?'. The third panel shows Anakin with a blank, silent stare, implying he has no idea what she's talking about. In the final panel, Padmé's smile has vanished, replaced with a look of dawning horror as she repeats, 'You mean the salted hash, right?'. A watermark for 'imgflip.com' is in the bottom-left corner. This meme hilariously captures a terrifyingly common scenario for senior developers: discovering a junior engineer has implemented a critical security feature (like password storage) in the most insecure way possible - storing plaintext passwords. It highlights the fundamental importance of security practices like hashing and salting to protect user data from breaches

Comments

25
Anonymous ★ Top Pick Storing passwords in plaintext is the technical equivalent of writing 'please rob me' on your server's welcome mat. At least with a salted hash, you make them work for it
  1. Anonymous ★ Top Pick

    Storing passwords in plaintext is the technical equivalent of writing 'please rob me' on your server's welcome mat. At least with a salted hash, you make them work for it

  2. Anonymous

    If your schema still has a `password` column instead of `password_hash`, congrats - you just provisioned both user auth and the future breach post-mortem in a single DDL statement

  3. Anonymous

    The real horror isn't finding plaintext passwords in production - it's discovering they're stored in a VARCHAR(20) column because 'nobody needs passwords longer than that' and the senior who wrote it is now the CTO

  4. Anonymous

    When your junior dev proudly announces they've 'optimized' authentication by storing passwords in plain text for 'faster lookups,' and you realize your next sprint will be entirely dedicated to explaining why SELECT * FROM users WHERE password = ? is a resume-generating event, not a feature. Bonus points if they've already pushed to production and you're now speedrunning GDPR violation bingo

  5. Anonymous

    Plaintext passwords in the DB? That's just a SELECT * FROM breach waiting to happen

  6. Anonymous

    Salted hash, right? If your strategy is SHA-256 plus one global salt and the “pepper” in an env var, congrats - you’ve built seasoned plaintext

  7. Anonymous

    Nothing says 'enterprise security' like a VARCHAR(255) password column and a Jira ticket titled 'hashing - post‑MVP.'

  8. @feskow 4y

    Where do you keep the salt - hard coded, in database or using characters from username?

    1. @CcxCZ 4y

      Salt is typically part of the output of the password hasing function. On Unix-like platforms this is handled by crypt() standard library function and most modern password hashes mimic it's interface. It uses random string by default and it should be as random as possible unless you have a good reason to make the output more predictable. (Postgresql has decent crypt library built-in by the way) You may be thinking of pepper which is extra step done in application to prevent leaking too much info in case someone gets raw access to SQL server, possibly via command injection.

      1. @feskow 4y

        Wait, isn't salt a part of the input of hash function?

        1. @CcxCZ 4y

          Yes, if you are verifying you need to produce the exact same output. If you are generating new hash though it should be random/unpredictable. The library usually handles that for you.

          1. dev_meme 4y

            Salt? Unpredictable? Again someone on internet doesn’t understand difference between salt and pepper!

            1. @CcxCZ 4y

              Yes unpredictable. It was designed to defeat precomputation attacks.

              1. dev_meme 4y

                It should be predictable, man. It shouldn’t be used by anyone else. E.g. userEmail + userId Good salt Very predictable

              2. Deleted Account 4y

                how will you check the password if the salt was unpredictable, lol

                1. @CcxCZ 4y

                  Store it in the crypt() format https://en.m.wikipedia.org/wiki/Crypt_(C)#Key_derivation_functions_supported_by_crypt

            2. Deleted Account 4y

              I know salt but what's pepper?

              1. dev_meme 4y

                Part added to hashed data which must be kept in secret (salt - public and easy to found, stored directly in DB or there are clear alghorthm how to get it) For pepper there shouldn't be way to found it, except known by user (e.g. manually written stirng additional string)

                1. Deleted Account 4y

                  Not added to hashed data, added to prehash data

                  1. dev_meme 4y

                    Added to data before it is hashed, sure, otherwise there is no reasob to to do)

              2. @p4vook 4y

                I've always thought that it's a password to symmetric encryption of the hashes, that could be regularly changed

        2. dev_meme 4y

          No, salt isn’t required input for hash function

  9. @Truth_0000 4y

    Can someone send a blank template for this?

    1. @Eddy_Rex 4y

      google my friend

      1. @Truth_0000 4y

        Nice advice

Use J and K for navigation