Skip to content

Commit a9370e9

Browse files
committed
Security: Don't fail the Argon2-related tests when it's not available on the test infrastructure.
These tests are not critical to the bcrypt functionality, they exist to reaffirm that the underlying use of `password_hash()` and `password_verify()` supports this algorithm. The Argon2 tests therefore shouldn't unnecessarily fail on hosts that don't support it. Props desrosj, johnbillion. Fixes #21022 git-svn-id: https://develop.svn.wordpress.org/trunk@60124 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ff65b7e commit a9370e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/phpunit/tests/auth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ public function test_wp_check_password_supports_plain_bcrypt_hash_with_default_b
288288
*/
289289
public function test_wp_check_password_supports_argon2i_hash() {
290290
if ( ! defined( 'PASSWORD_ARGON2I' ) ) {
291-
$this->fail( 'Argon2i is not supported.' );
291+
$this->markTestSkipped( 'Argon2i is not supported.' );
292292
}
293293

294294
$password = 'password';
@@ -306,7 +306,7 @@ public function test_wp_check_password_supports_argon2i_hash() {
306306
*/
307307
public function test_wp_check_password_supports_argon2id_hash() {
308308
if ( ! defined( 'PASSWORD_ARGON2ID' ) ) {
309-
$this->fail( 'Argon2id is not supported.' );
309+
$this->markTestSkipped( 'Argon2id is not supported.' );
310310
}
311311

312312
$password = 'password';

0 commit comments

Comments
 (0)