This is a trivial issue, but it's been annoying me.

When i want to change a setting on admin/settings/salesforce, i have to re-enter the salesforce_api_password, even if it's saved to variables already. Otherwise, since it's a FAPI type "password" field, the default_value is not respected (this is an old, old issue: #67519: #default_value doesn't work with password fields).

This patch assumes that unless the user clicked "Reset to Defaults", the existing password should remain.
This is a conscious choice to retain FAPI type "password" instead of exposing the SalesForce password in plaintext.

The only minor issue I can foresee with this change is that an admin user cannot set the salesforce_api_password to NULL without clicking "Reset to defaults". If *that* is a real issue, then I would propose splitting the settings panel into 2 MENU_LOCAL_TASKS (e.g. Credentials and Settings) so that admins don't have to re-enter their password whenever they want to change settings.

Comments

aaronbauman’s picture

Status: Patch (to be ported) » Needs review
Bevan’s picture

I think this is a security feauture of FAPI. Does this patch fix it by forcing #default_value, or by not deleting it if the password field is empty?

Bevan’s picture

Priority: Minor » Normal
Status: Needs review » Reviewed & tested by the community

Nevermind, I tried it out. It does the latter. Works for me. Patch looks good except for one minor whitespace issue.

Bevan’s picture

StatusFileSize
new1.94 KB

I committed the attached variation to DRUPAL-6--2. See http://drupal.org/project/cvs/141315

Note I tidied up whitespace considerably, and modified the flow a little to meet Drupal's coding standards and conventions.

Bevan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.