magespecialist/m2-MSP_SMTP

saving the sysconf twice wipes the password field

Closed this issue · 1 comments

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 as type="obscure", but lacks the proper backend_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

Thank you @francescosalvi, you PR has been merged and version 3.0.1 has been released.