Make WordPress Core

Changeset 60124


Ignore:
Timestamp:
04/03/2025 02:07:29 PM (6 weeks ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/auth.php

    r60123 r60124  
    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
     
    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
Note: See TracChangeset for help on using the changeset viewer.