SMF icon indicating copy to clipboard operation
SMF copied to clipboard

[3.0]: Undefined array key "passwrd1" when changing password

Open DiegoAndresCortes opened this issue 1 year ago • 4 comments

Basic Information

Undefined array key "passwrd1" in Sources/Profile.php, line 2170

Steps to reproduce

  1. Type a new password
  2. Type current password
  3. Save

Expected result

No response

Actual result

No response

Version/Git revision

3.1 Alpha 1

Database Engine

All

Database Version

No response

PHP Version

8.0.30

Logs

No response

Additional Information

No response

DiegoAndresCortes avatar Jan 29 '24 17:01 DiegoAndresCortes

I was actually still on #7853

DiegoAndresCortes avatar Jan 29 '24 17:01 DiegoAndresCortes

Well it turns out I can still reproduce it. It's inconsistent however, hopefully someone else can also reproduce this...

And sometimes the 'Current Password' field doesn't show up, I'm a bit confused with this one.

DiegoAndresCortes avatar Jan 29 '24 18:01 DiegoAndresCortes

See this for example. I tried to change the password and all three inputs are correct, but the return is this field in red, no error, what does it mean? Screenshot_324

DiegoAndresCortes avatar Jan 29 '24 18:01 DiegoAndresCortes

@Sesquipedalian I can reproduct this as well

				// Set the save variable.
				$this->new_data[$db_key] = $_POST[$key];

				// And update the user profile.
				$this->data[$key] = $this->new_data[$key];

Seems that $db_key is passwd and $key is passwd1. $this->new_data[$db_key] and $this->data[$key] do not exist. However $_POST[$key] exists and has the encrypted password.

jdarwood007 avatar Jan 29 '24 23:01 jdarwood007