Hash passwords, not encrypt.
An encryption is reversible, a hash result isn't.
Ugh. A credit card company...really?
"8.4 Render all passwords unreadable during transmission and storage on all system components using strong cryptography"
It's also fair to say that the next few years will be a busy time for the government agencies tasked with GDRP enforcement.
(Assuming they do it properly, which falls within the responsibility of the relevant country)
Also, the ruling mentioned a reduced fine for cooperation and quick remediation. This probably wouldn't play out so well with a bloated structure and process, as you mentioned.
What you do is have one single function create the user, pick a random password, set it in the database (which in my case uses a perfectly sensible hash) and send the user email. The cleartext password in the mail comes from the function's local string variable, not from the database.
Whether doing this is a good idea is another question. IMO it usually isn't. But this kind of mail does not prove cleartext access.
Well, the way I read the parent is that you can request a previously set password to be sent to your e-mail.
Of course, you may have a system that forces a password reset on login. That won't help the users who have never logged in. Those accounts are freely available to a hacker.
Plaintext passwords anywhere are a really bad idea.
The recipients' servers store the message with the password, of course, but they also store the other messages the same user has received from the same server, which in my case contain the same information as what could be accessed with the password. So the password offers very little additional value to an attacker, compared to just reading the mail.
If someone has access to your codebase you've got bigger problems than plaintext passwords anyway.
Not necessarily. The simple solution is client-side hashing. You could combine that with challenge-response to only reveal the password hash to the server once.
You're joking, right? The context of the discussion is when your database is already leaked. Then the chance is that your e-mail database is leaked, too. You may leak code, too. It doesn't necessarily mean someone can execute arbitrary code on your server though, yet.