Closed torohill closed 4 years ago
I also tested with Grav v1.7.0-rc.11, Admin v1.10.0-rc.11, and Email v3.0.8 and found the same behaviour.
Should this issue be filed on the admin plugin instead of here?
Fixed for next release
@rhukster Looks good.
What do you think should happen in the (far less common) case of someone wanting to save an empty password when there is already an existing password? Is it worth creating another issue for that?
edit the files since validation on the admin plugin wont let you save it empty anyone (now that the bug is fixed)
When the Email plugin settings are saved through the admin a value is always written to
mailer.smtp.password
even if no password is submitted. This means if the password is already set and I go back and edit the Email plugin settings again, but don't re-enter a password, an empty value will be saved over the existing password.Reproduction steps on Grav v1.6.25, Admin v1.9.14, and Email v3.0.8:
mailer.smtp.password
field inuser/config/plugin/email.yaml
and confirm the password you entered was saved.mailer.smtp.password
field inuser/config/plugin/email.yaml
and see that it is set tonull
.Maybe there needs to be additional logic when saving password fields to avoid this issue. A couple of thoughts:
I'm not sure if this should actually be filed on the Admin plugin (I checked and didn't see an existing issue there), as I'm guessing this issue affects all password fields in the admin, and not just the SMTP password field.