File tree Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ Standard:
25
25
. Partly fix GH-12143 (Incorrect round() result for 0.49999999999999994).
26
26
(timwolla)
27
27
. Fix GH-12252 (round(): Validate the rounding mode). (timwolla)
28
+ . Increase the default BCrypt cost to 12. (timwolla)
28
29
29
30
XSL:
30
31
. Implement request #64137 (XSLTProcessor::setParameter() should allow both
Original file line number Diff line number Diff line change @@ -80,6 +80,10 @@ PHP 8.4 UPGRADE NOTES
80
80
would have resulted in 1.0 instead of the correct result 0.0. Additional
81
81
inputs might also be affected and result in different outputs compared to
82
82
earlier PHP versions.
83
+ . The default value of the 'cost' option for PASSWORD_BCRYPT for password_hash()
84
+ has been increased from '10' to '12'.
85
+
86
+ RFC: https://wiki.php.net/rfc/bcrypt_cost_2023
83
87
84
88
========================================
85
89
6. New Functions
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ PHP_MINIT_FUNCTION(password);
22
22
PHP_MSHUTDOWN_FUNCTION (password );
23
23
24
24
#define PHP_PASSWORD_DEFAULT PHP_PASSWORD_BCRYPT
25
- #define PHP_PASSWORD_BCRYPT_COST 10
25
+ #define PHP_PASSWORD_BCRYPT_COST 12
26
26
27
27
#ifdef HAVE_ARGON2LIB
28
28
/**
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test normal operation of password_hash()
3
+ --SKIPIF--
4
+ <?php if (getenv ("SKIP_SLOW_TESTS " )) die ("skip slow test " ); ?>
3
5
--FILE--
4
6
<?php
5
7
//-=-=-=-
6
8
7
- var_dump (strlen ( password_hash ("foo " , PASSWORD_BCRYPT ) ));
9
+ var_dump (password_hash ("foo " , PASSWORD_BCRYPT ));
8
10
9
11
$ algos = [
10
12
PASSWORD_BCRYPT ,
@@ -19,8 +21,8 @@ foreach ($algos as $algo) {
19
21
20
22
echo "OK! " ;
21
23
?>
22
- --EXPECT --
23
- int (60)
24
+ --EXPECTF --
25
+ string (60) "$2y$12$%s"
24
26
bool(true)
25
27
bool(true)
26
28
bool(true)
Original file line number Diff line number Diff line change 1
1
--TEST--
2
2
Test removed support for explicit salt option
3
+ --SKIPIF--
4
+ <?php if (getenv ("SKIP_SLOW_TESTS " )) die ("skip slow test " ); ?>
3
5
--FILE--
4
6
<?php
5
7
//-=-=-=-
You can’t perform that action at this time.
0 commit comments