saving the sysconf twice wipes the password field
Closed this issue · 1 comments
francescosalvi commented
Environment
Magento 2.3.3, a SMTP server using LOGIN authentication
How to replicate
- Populate the backoffice form with all the required values, including the valid SMTP password, and submit the form.
- Sending a test email works
- Reload the above form, save it again
- Emails sending is broken (authentication fails)
Root cause
- The system.xml field
password
is declared astype="obscure"
, but lacks the properbackend_model
; because of this on page reloads the field is initialized with literal asterisks (see\Magento\Framework\Data\Form\Element\Obscure::$_obscuredValue
), which on new form save are actually persisted to db.
Solution
Already have the working fix, will submit the PR in a moment
giacmir commented
Thank you @francescosalvi, you PR has been merged and version 3.0.1 has been released.