Opened 3 years ago
Closed 3 years ago
#8589 closed enhancement (fixed)
Enforce strong passwords within user profile settings
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 10.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | has-patch 2nd-opinion needs-refresh |
Cc: |
Description
Hello,
We've noticed that a user can go into their profile settings and change their password to something very weak (e.g. a single character). Other BuddyPress users have noticed this, too: βhttps://buddypress.org/support/topic/require-strong-password-in-profile-edit/
Is this something that could be enhanced in a future update, so that users can only create strong passwords in all areas? π
Thanks.
Attachments (1)
Change History (11)
#2
@
3 years ago
- Component changed from Core to Templates
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 10.0.0
- Owner set to imath
- Status changed from new to assigned
Hi @niftythree
Thanks a lot for bringing this to my attention. Itβs possible and itβs easier to do for the Nouveau template pack as it uses the WordPress password control. I agree we need to port this to the legacy template pack and use an easy way to enforce strong password. Iβll work on it during 10.0.0
#4
@
3 years ago
- Keywords has-patch 2nd-opinion added; needs-patch removed
Hi @niftythree
β8589.patch is bringing the needed code to enforce a level of password. By default it allows any password, but you can define a constant to enforce a strong (or less strong password).
eg:
define( 'BP_MEMBERS_REQUIRED_PASSWORD_STRENGTH', 4 ); // 4 is the strength score for strong passwords.
It only applies to BuddyPress generated template on the front end (registration/Member's general settings page). This means it doesn't change anything to WordPress only parts (eg: the WP Admin user profile, or the lost password WP Login screen).
Reading the βsupport topic you linked in your description, I guess there's already a WordPress Plugin doing the job, so we shouldn't mess with him imho π.
@dcavins or @vapvarun what are you thoughts about this feature?
#5
@
3 years ago
@imath I think this is a great change. I've tested it out with Legacy and Nouveau and it works as expected. My only suggestion is that bp_members_user_pass_required_strength_description()
shouldn't try to describe the strength required, but should show what characters are required, for instance. "Your password must be weak at least to be allowed on this site." doesn't inspire much confidence. :)
I'm sure that the password strength-o-meter isn't this obvious, but for level 1, could we say "Use a mix of upper- and lowercase letters." and so on? If not, I'd suggest we just offer solid password advice, regardless of the level selected, like "Strong passwords are made up of upper- and lowercase letters, numbers and special characters. Longer passwords are generally stronger."
#6
@
3 years ago
- Keywords needs-refresh added
Thanks for your feedback @dcavins I'll update the patch this way using a single description for each strength level. I agree current ones make me feel no great π¬.
#7
@
3 years ago
@imath We can also cover password change notice at the same patch, as it's currently
"Your settings have been saved." even for password changes
We should have clarified that this is in addition to users being able to register an account with a weak password, and that we're using the Legacy template.