This commit is contained in:
Javier Casares 2026-08-23 07:08:42 +00:00
commit e6cba7ef6a
21 changed files with 2559 additions and 1286 deletions

View file

@ -557,8 +557,10 @@ function wpvulnerability_permission_check( WP_REST_Request $request ) {
return true;
}
// Check if application passwords are available.
if ( wp_is_application_passwords_available() ) {
// Check if application passwords are available (WordPress 5.6+).
// On older WordPress versions this authentication method is skipped and
// only cookie-authenticated sessions with admin capabilities are accepted.
if ( function_exists( 'wp_is_application_passwords_available' ) && function_exists( 'wp_authenticate_application_password' ) && wp_is_application_passwords_available() ) {
$authorization_header = $request->get_header( 'authorization' );
// Check if the authorization header is present and properly formatted.