diff options
author | datibbaw <datibbaw@php.net> | 2013-09-27 15:06:49 +0800 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2013-09-27 09:20:28 +0200 |
commit | 83cd64d415724127bd0db09ef1431e19a53afdea (patch) | |
tree | 8d14d16a247a1778cd751bb0f7b51ea7228a5301 /Core/Encoder/BCryptPasswordEncoder.php | |
parent | 97faa986a60edadef4fc35fed239693ba13c9c9f (diff) | |
download | symfony-security-83cd64d415724127bd0db09ef1431e19a53afdea.zip symfony-security-83cd64d415724127bd0db09ef1431e19a53afdea.tar.gz symfony-security-83cd64d415724127bd0db09ef1431e19a53afdea.tar.bz2 |
Set cost type to integerv2.3.5
This seems to be a remnant of when the code dealt with crypt() directly. The password_hash() function expects the cost option to be an LVAL (it does a type conversion for strings).
Diffstat (limited to 'Core/Encoder/BCryptPasswordEncoder.php')
-rw-r--r-- | Core/Encoder/BCryptPasswordEncoder.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Core/Encoder/BCryptPasswordEncoder.php b/Core/Encoder/BCryptPasswordEncoder.php index a355421..9349291 100644 --- a/Core/Encoder/BCryptPasswordEncoder.php +++ b/Core/Encoder/BCryptPasswordEncoder.php @@ -42,7 +42,7 @@ class BCryptPasswordEncoder extends BasePasswordEncoder throw new \InvalidArgumentException('Cost must be in the range of 4-31.'); } - $this->cost = sprintf('%02d', $cost); + $this->cost = $cost; } /** |