- Affected version
- 2.0.10
PasswordChange::isValid assumes that the only error that XF\Entity\UserAuth can return is against the 'password' field. Except UserAuth is a fully entity which can in theory return a large number of potential errors.
PHP:
public function isValid(&$error)
{
$this->userAuth->preSave();
$errors = $this->userAuth->getErrors();
if (empty($errors['password']))
{
return true;
}
else
{
$error = $errors['password'];
return false;
}
}