Don't overwrite password fields on connection edit

Created on 6 January 2023, over 1 year ago
Updated 24 January 2023, over 1 year ago

Problem/Motivation

When you edit a connection plugin with a password, it will show an empty password field and because the submitted config is saved as-is, the stored password is cleared/overwritten with an empty string on save.

Steps to reproduce

Use the Mail Group IMAP plugin, setup an IMAP server connection, edit and save it again.

Proposed resolution

Post form validation:

  • Check for password fields, that are not flagged as required
  • Remove corresponding fields with empty value in the form state, from the form state
  • Merge the form state values with the current config before save

This assumes the connection plugin flags password fields as not required if a value already exists. If not, then it forces the end-user to provide the password(s) anyway and nothing should change.

✨ Feature request
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium andreasderijcke Antwerpen / Gent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024