v5.1.6
This commit is contained in:
parent
7dfff83511
commit
e6cba7ef6a
21 changed files with 2559 additions and 1286 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue