mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Users: prevent saving empty passwords, trim space from password ends on save.
Fix an issue where users could save a password with only spaces, or spaces at the beginning or end of their password, preventing them from logging in. Props ronakganatra, 1naveengiri, ajensen, oolleegg55, bookdude13, nrqsnchz, aristath. Fixes #42766. git-svn-id: https://develop.svn.wordpress.org/trunk@49118 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -47,10 +47,10 @@ function edit_user( $user_id = 0 ) {
|
||||
$pass1 = '';
|
||||
$pass2 = '';
|
||||
if ( isset( $_POST['pass1'] ) ) {
|
||||
$pass1 = $_POST['pass1'];
|
||||
$pass1 = trim( $_POST['pass1'] );
|
||||
}
|
||||
if ( isset( $_POST['pass2'] ) ) {
|
||||
$pass2 = $_POST['pass2'];
|
||||
$pass2 = trim( $_POST['pass2'] );
|
||||
}
|
||||
|
||||
if ( isset( $_POST['role'] ) && current_user_can( 'promote_users' ) && ( ! $user_id || current_user_can( 'promote_user', $user_id ) ) ) {
|
||||
|
||||
Reference in New Issue
Block a user