We were migrating a database and my leader told me to create a temporary feature that sends a email containing a new randomly generated password to every email address that was registered on the system.
The thing was I forgot to add the "new" keyword when creating the mailer object as I thought it would create a new instance on every call.
Every time the "feature" sent an email, the email address would be appended to a property of the mailer object. Thus, the previous users (that had been emailed) received the email for the next users and had their inbox spammed. Fortunately it was just some randomly generated password.
What a stupid mistake lol.
(Please forgive my grammar mistakes, if there are any)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
We were migrating a database and my leader told me to create a temporary feature that sends a email containing a new randomly generated password to every email address that was registered on the system.
The thing was I forgot to add the "new" keyword when creating the mailer object as I thought it would create a new instance on every call.
Every time the "feature" sent an email, the email address would be appended to a property of the mailer object. Thus, the previous users (that had been emailed) received the email for the next users and had their inbox spammed. Fortunately it was just some randomly generated password.
What a stupid mistake lol.
(Please forgive my grammar mistakes, if there are any)