We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1110490 + dc76833 commit 2693280Copy full SHA for 2693280
app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
@@ -53,17 +53,8 @@ public function beforeSave($object)
53
);
54
}
55
56
- if ($this->string->substr(
57
- $password,
58
- 0,
59
- 1
60
- ) == ' ' || $this->string->substr(
61
62
- $length - 1,
63
64
- ) == ' '
65
- ) {
66
- throw new LocalizedException(__('The password can\'t begin or end with a space.'));
+ if (trim($password) != $password) {
+ throw new LocalizedException(__('The password can not begin or end with a space.'));
67
68
69
$object->setPasswordHash($object->hashPassword($password));
0 commit comments