Skip to content

Commit 2693280

Browse files
author
okarpenko
committed
Merge branch 'MAGETWO-39123-new' of https://github.corp.ebay.com/magento-south/magento2ce into BUGS
2 parents 1110490 + dc76833 commit 2693280

File tree

1 file changed

+2
-11
lines changed
  • app/code/Magento/Customer/Model/Customer/Attribute/Backend

1 file changed

+2
-11
lines changed

app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,8 @@ public function beforeSave($object)
5353
);
5454
}
5555

56-
if ($this->string->substr(
57-
$password,
58-
0,
59-
1
60-
) == ' ' || $this->string->substr(
61-
$password,
62-
$length - 1,
63-
1
64-
) == ' '
65-
) {
66-
throw new LocalizedException(__('The password can\'t begin or end with a space.'));
56+
if (trim($password) != $password) {
57+
throw new LocalizedException(__('The password can not begin or end with a space.'));
6758
}
6859

6960
$object->setPasswordHash($object->hashPassword($password));

0 commit comments

Comments
 (0)