Skip to content

Commit 4764a21

Browse files
committed
REFACTOR don’t explicitly set new encryptor
This causes an issue with the Password Reset funcitonality of SilverStripe. There is an active PR to update the hashing of passwords that will help resolve the overall issue once it’s merged.
1 parent 7a15cea commit 4764a21

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

_config/config.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,3 @@ SilverStripe\Core\Injector\Injector:
2828
properties:
2929
format: '%Region/%Name'
3030

31-
SilverStripe\Security\Security:
32-
password_encryption_algorithm: 'bcrypt'
33-
34-
'SilverStripe\Security\PasswordEncryptor':
35-
encryptors:
36-
bcrypt:
37-
'Dynamic\FoxyStripe\Security\PasswordEncryptor_BCrypt':

src/Security/PasswordEncryptor_BCrypt.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Dynamic\FoxyStripe\Security;
44

55
use SilverStripe\Security\PasswordEncryptor;
6+
use SilverStripe\Security\PasswordEncryptor_EncryptionFailed;
67

78
/**
89
* Class PasswordEncryptor_BCrypt
@@ -46,8 +47,10 @@ public static function get_cost()
4647

4748
/**
4849
* @param String $password
50+
* @param null $salt
4951
* @param null $member
50-
* @return bool|string
52+
* @return bool|String
53+
* @throws PasswordEncryptor_EncryptionFailed
5154
*/
5255
public function encrypt($password, $salt = null, $member = null)
5356
{
@@ -63,6 +66,8 @@ public function encrypt($password, $salt = null, $member = null)
6366
/**
6467
* @param string $hash
6568
* @param string $password
69+
* @param null $salt
70+
* @param null $member
6671
* @return bool
6772
*/
6873
public function check($hash, $password, $salt = null, $member = null)

0 commit comments

Comments
 (0)