As JohnGB said, this is really a security precaution. However, there is an alternative way which is usable and secure at the same time. Rather than sending back the password
mypassword, you can:
- Send back a hidden field indicating the password is saved on the server (hashed, of course).
- In the password field, assign the value
- The user will see
******** in the password field. If the user attempts to change the password, clear the field and prompt for a new password (change the hidden field indicator).
This will obviously require client-side scripting. Alternatively, you can replace the password field with
Password: ******** and add new fields for
New Password and
Confirm New Password. Then you only update the server-stored password if the user enters a new password.
Other than the password length being different, the user will only see the obfuscated form and will assume that their actual password is in the field. To this extent, their behaviour does not change.
One issue with this approach is that users cannot see their passwords so will be unable to use the show password option, if you provide it. One possibility is disabling the field with a 'Change password' button to allow the user to enter a new password.