diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Security/Authentication/Encoder')
-rw-r--r-- | src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php b/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php index 56f1affe..fcfe418b 100644 --- a/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php +++ b/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php | |||
@@ -41,10 +41,6 @@ class WallabagPasswordEncoder extends BasePasswordEncoder | |||
41 | */ | 41 | */ |
42 | public function encodePassword($raw, $salt) | 42 | public function encodePassword($raw, $salt) |
43 | { | 43 | { |
44 | if (null === $this->username) { | ||
45 | throw new \LogicException('We can not check the password without a username.'); | ||
46 | } | ||
47 | |||
48 | if ($this->isPasswordTooLong($raw)) { | 44 | if ($this->isPasswordTooLong($raw)) { |
49 | throw new BadCredentialsException('Invalid password.'); | 45 | throw new BadCredentialsException('Invalid password.'); |
50 | } | 46 | } |
@@ -71,6 +67,10 @@ class WallabagPasswordEncoder extends BasePasswordEncoder | |||
71 | */ | 67 | */ |
72 | protected function mergePasswordAndSalt($password, $salt) | 68 | protected function mergePasswordAndSalt($password, $salt) |
73 | { | 69 | { |
70 | if (null === $this->username) { | ||
71 | throw new \LogicException('We can not check the password without a username.'); | ||
72 | } | ||
73 | |||
74 | if (empty($salt)) { | 74 | if (empty($salt)) { |
75 | return $password; | 75 | return $password; |
76 | } | 76 | } |