Make WordPress Core

Changeset 60126


Ignore:
Timestamp:
04/03/2025 02:46:09 PM (6 weeks ago)
Author:
desrosj
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.

Reviewed by desrosj.
Merges [60124] to the 6.8 branch.

Props desrosj, johnbillion.
Fixes #21022.

Location:
branches/6.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.8

  • branches/6.8/tests/phpunit/tests/auth.php

    r60125 r60126  
    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.