summaryrefslogtreecommitdiffstats
path: root/Core
diff options
context:
space:
mode:
authorJakub Zalas <jakub@zalas.pl>2013-05-10 22:26:48 +0100
committerJakub Zalas <jakub@zalas.pl>2013-05-10 22:34:58 +0100
commitd75c3de9d5f070d1a812bca11db57248a21eb1db (patch)
treedd66c94f6f40e83bf0a6921bc7138030791796b1 /Core
parent38520edbb31cdba5c83e03184f515a6e430ed4f1 (diff)
downloadsymfony-security-d75c3de9d5f070d1a812bca11db57248a21eb1db.zip
symfony-security-d75c3de9d5f070d1a812bca11db57248a21eb1db.tar.gz
symfony-security-d75c3de9d5f070d1a812bca11db57248a21eb1db.tar.bz2
[Security] Disabled the BCryptPasswordEncoder tests for PHP versions lower than 5.3.7.
See https://github.com/ircmaxell/password_compat/issues/10#issuecomment-11203833.
Diffstat (limited to 'Core')
-rw-r--r--Core/Encoder/BCryptPasswordEncoder.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/Core/Encoder/BCryptPasswordEncoder.php b/Core/Encoder/BCryptPasswordEncoder.php
index 2789444..3609f64 100644
--- a/Core/Encoder/BCryptPasswordEncoder.php
+++ b/Core/Encoder/BCryptPasswordEncoder.php
@@ -46,7 +46,17 @@ class BCryptPasswordEncoder extends BasePasswordEncoder
}
/**
- * {@inheritdoc}
+ * Encodes the raw password.
+ *
+ * It doesn't work with PHP versions lower than 5.3.7, since
+ * the password compat library uses CRYPT_BLOWFISH hash type with
+ * the "$2y$" salt prefix (which is not available in the early PHP versions).
+ * @see https://github.com/ircmaxell/password_compat/issues/10#issuecomment-11203833
+ *
+ * @param string $raw The password to encode
+ * @param string $salt The salt
+ *
+ * @return string The encoded password
*/
public function encodePassword($raw, $salt)
{