Posted by deekayen on August 6, 2008 at 10:44pm
| Project: | Password policy |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | afreeman |
| Status: | closed (fixed) |
Issue Summary
If a user other than the account owner changes the password on the account, when the account owner logs in, force the account owner to change their password. Windows Server has a similar feature (use must change password on next logon checkbox).
Comments
#1
This isn't optional for secure sites.
Drupal sends password information via plaintext E-mail, immediately compromising security. Also, the automatic password should expire after enough time has passed to allow for the user to receive the E-mail and log in. The greater the intervening time, the greater the security risk.
#2
See: Force users to change password on first login
#3
Deekayen, could this feature be moved to the login_security module? it makes sense to have it there. In fact, there's a portion of code (you developed) that fires up on 1st time login..
#4
This issue is now handled by the Force Password Change module.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.
#6
Allen is going to port his patch from #730266: Doesn't follow Drupal code style really at all back to here.
#7
#8
Added code to support forced password change by role, individual user or to force all new users to change their password on first login. Made minor bugfixes for WSoD encountered when trying to add new policies. Added unit tests for force password change feature set. Also rewrote several existing tests to work with the new policy by role code.
#9
As suggested by deekayen removed password change url field from UI, added missing variable_del() to hook_uninstall & made a couple minor tweaks to the test suite.
#10
Patch #9 looks good overall. I think this functionality should definitely be included in the next Password Policy release.
Couple issues found with patch:
I'll roll a new patch based on #9 and submit this evening.
#11
Attached is patch based on #9. Changes include:
#12
Other than a couple minor tweaks your patch looks great. Good call clearing out the password enforcement (history, null), that stuff snuck in during the port from Force Password Change.
A few minor issues encountered:
- a change in wording to one of the alter messages caused several tests to break
- unselected roles from the form submission resulted in 0's in the $roles array, when parsed mayhem ensued.
- Since no special handling of Authenticated Users was present and role 2 doesn't add entries to the users_roles table selecting authenticated users wasn't working.
- Dunno if I missed this or if it snuck in with the latest patch but there was a bug in the formatting of the update query in the form submit handler that resulted in only the first user assigned to a given role getting flagged. For more details refer to http://drupal.org/node/381352
Attached patch based on #11
- rewrote portions of the FPC test suite to work with changes in #11
- fixed query formatting bug in password_policy_change_settings_submit()
- fixed bug caused by unselected roles resulting in 0's in the roles array
#13
subscribing
#14
installed password policy module and applied the patch in #12
Functionality seems to work correctly.
I chose the "Force password change on first-time login" option and created new user. Was asked to change password on first login and successfully did so.
Chose a role to have all users of that role be forced to change their password and this functionality was successful.
Chose a user to force password change on next login and this functionality was successful.
I found one usability issue. When Password Change Tab is enabled, the checkbox to force the user to reset their password on the user profile password tab is below the submit button.
#15
Rerolled with fix for password tab UX issue.
#16
committed to HEAD
#17
Hi,
This seems to work fine for me on our test site. Thank you for sorting this out - we go live next week and I thought this would never get fixed as the problem is years old. Great stuff!
#18
Automatically closed -- issue fixed for 2 weeks with no activity.