PluginProbe
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity / 3.3.10
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity v3.3.10
3.3.10 3.3.9 3.3.8 trunk 1.0 1.1.0 1.10.0 1.11.0 1.11.1 1.12.0 1.13.0 1.14.0 1.15.0 1.16.0 1.17.0 1.17.1 1.18.0 1.19.0 1.2.0 1.20.0 1.20.1 1.3.0 1.3.1 1.4.0 1.5.0 All 68 releases
← All changes | Core/Admin/Logtivity_Log_Index_Controller.php +5 -2 3.3.8 → 3.3.10 View file →
@@ -29,9 +29,8 @@
29 29 class Logtivity_Log_Index_Controller
30 30 {
31 31 public function __construct()
32 32 {
33 - add_action('wp_ajax_nopriv_logtivity_log_index_filter', [$this, 'search']);
34 33 add_action('wp_ajax_logtivity_log_index_filter', [$this, 'search']);
35 34 }
36 35
37 36 /**
@@ -46,8 +45,10 @@
46 45 * @return void
47 46 */
48 47 public function search(): void
49 48 {
49 + check_ajax_referer('logtivity_log_index_filter', 'logtivity_log_index_nonce');
50 +
50 51 if (current_user_can(Logtivity::ACCESS_LOGS)) {
51 52 $api = Logtivity::log();
52 53
53 54 if ($api->getOption()->getApiKey()) {
@@ -89,9 +90,11 @@
89 90 * @return ?string
90 91 */
91 92 protected function getInput(string $field): ?string
92 93 {
93 - return sanitize_text_field($_GET[$field] ?? null);
94 + return isset($_GET[$field])
95 + ? sanitize_text_field(wp_unslash($_GET[$field]))
96 + : null;
94 97 }
95 98
96 99 /**
97 100 * @param string|array $response