1
0
mirror of https://github.com/php/php-src.git synced 2026-04-11 18:13:00 +02:00
Files
archived-php-src/ext
Tim Düsterhus 7882d12ff2 crypt: Fix validation of malformed BCrypt hashes
PHP’s implementation of crypt_blowfish differs from the upstream Openwall
version by adding a “PHP Hack”, which allows one to cut short the BCrypt salt
by including a `$` character within the characters that represent the salt.

Hashes that are affected by the “PHP Hack” may erroneously validate any
password as valid when used with `password_verify` and when comparing the
return value of `crypt()` against the input.

The PHP Hack exists since the first version of PHP’s own crypt_blowfish
implementation that was added in 1e820eca02.

No clear reason is given for the PHP Hack’s existence. This commit removes it,
because BCrypt hashes containing a `$` character in their salt are not valid
BCrypt hashes.
2023-02-13 13:17:01 -06:00
..
2022-06-25 07:39:55 +01:00
2022-06-17 19:52:44 -04:00
2022-07-27 12:13:32 +02:00
2022-11-03 14:37:17 +01:00
2022-09-13 11:33:09 +01:00
2022-04-25 14:29:44 +02:00
2023-01-09 14:08:40 +01:00
2022-09-27 23:32:15 +02:00
2022-06-13 14:43:51 +02:00
2022-08-31 14:22:44 +02:00
2022-12-18 23:20:29 -07:00
2022-10-13 16:00:36 +02:00
2022-06-20 18:46:17 +02:00
2022-06-15 15:39:00 +02:00
2022-06-25 07:39:55 +01:00