-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SMTP Email Password Lost in Craft 3.1 Update #3699
Comments
Email passwords were never (supposed to be) stored as base64-encoded strings in the DB, only plain text. But this is the second time someone has had this issue. We can’t reproduce though. Any chance you can send your prep-3.3-update database backup to support@craftcms.com? (It’ll be the first backup in |
I did some investigating and this appears to reproducable as follows:
The resulting value that is stored in the
So Chrome's password field is cms/src/mail/transportadapters/Smtp.php Line 84 in 0173df7
But because the password field is a plaintext field in 3.1, the decoding is not being applied any more: cms/src/mail/transportadapters/Smtp.php Line 151 in 51b8140
I'm not sure what the best solution is, perhaps decoding the tansport adaptor password setting in a migration? |
Thanks! Steps 3 and 4 were missing when I first tried to reproduce this. We never intended for Craft 3.0 to store encrypted passwords in the database; it was meant to be a UI-only thing. Will write a 3.1 migration that updates email settings in |
Great, thanks. |
So I've just had the same issue with a site that was on Craft 3.0.28, migrating to the latest 3.7.37. Just to share my super quick dirty fix I utilised the existing
|
I'm sure this has come up somewhere already but I couldn't find it in any issues besides #1977 (comment).
What I've come across in helping others out is that after updating from Craft 3.0.x to 3.1.3, their SMTP email password was converted to a base64 encoded string, that read something like:
base64_encoded:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This appears to be related to the password field being changed to an autosuggest field but it has been quietly breaking email sending on sites where the password has not been resaved since the update.
The text was updated successfully, but these errors were encountered: