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 | Loggers/Code_Snippets/Logtivity_Code_Snippets.php +11 -2 3.3.9 → 3.3.10 View file →
@@ -83,10 +83,19 @@
83 83 */
84 84 public function snippetCreated($snippet, $table): void
85 85 {
86 86 // Will not work in newer versions of Code Snippets
87 - $cloneId = sanitize_text_field($_GET['action'] ?? null) == 'clone'
88 - ? sanitize_text_field($_GET['id'] ?? null)
87 + // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Passive logger reads Code Snippets request state after that plugin handles auth.
88 + $action = isset($_GET['action'])
89 + ? sanitize_text_field(wp_unslash($_GET['action']))
90 + : null;
91 + $id = isset($_GET['id'])
92 + ? sanitize_text_field(wp_unslash($_GET['id']))
93 + : null;
94 + // phpcs:enable WordPress.Security.NonceVerification.Recommended
95 +
96 + $cloneId = $action == 'clone'
97 + ? $id
89 98 : null;
90 99
91 100 $logger = Logtivity::log()
92 101 ->setAction('Code Snippet Created')