Das beliebte Yoast SEO Plugin für WordPress ist ebenfalls beliebt als Einfallstor für Exploits. Aktuelle Exploits für die Yoast Version 3.0.7 sind noch nicht bekannt! Es schadet allerdings nicht in seine WordPress Security zu investieren und die functions.php um folgendes Snippet zu erweitern, um die Ausgabe der Versionsnummer von Yoast im Seitenquelltext zu verstecken.
// Removing yoast markup from header
add_action('get_header', 'start_ob');
add_action('wp_head', 'end_ob', 999);
function start_ob() {
ob_start('remove_yoast');
}
function end_ob() {
ob_end_flush();
}
function remove_yoast($output) {
if (defined('WPSEO_VERSION')) {
$targets = array(
'',
'',
'',
''
);
$output = str_ireplace($targets, '', $output);
$output = trim($output);
$output = preg_replace('/^[ \t]*[\r\n]+/m', '', $output);
}
return $output;
}