Mal ganz interessant zu lesen bzw. kann ich persönlich auch bestätigen
http://www.linux-magazin.de/NEWS/Angriffsw…cht-einen-Patch
Sinnvoll wäre es sicher, für diejenigen die die Rest-API nicht benötigen, für den Frontend Bereich zu deaktivieren
functions.php
Code
function only_allow_logged_in_rest_access( $access ) {
if( ! is_user_logged_in() ) {
return new WP_Error( 'rest_cannot_access', 'Only authenticated users can access the REST API.', array( 'status' => rest_authorization_required_code() ) );
}
return $access;
}
add_filter('rest_authentication_errors', 'only_allow_logged_in_rest_access');
remove_action('wp_head', 'rest_output_link_wp_head', 10);
remove_action('template_redirect', 'rest_output_link_header', 11);
remove_action('xmlrpc_rsd_apis', 'rest_output_rsd');
Alles anzeigen