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/Core/Logtivity_Core.php +11 -3 3.3.8 → 3.3.10 View file →
@@ -191,10 +191,16 @@
191 191 * @return void
192 192 */
193 193 public function maybeSettingsUpdated(): void
194 194 {
195 - $optionPage = sanitize_text_field($_POST['option_page'] ?? '');
196 - $action = sanitize_text_field($_POST['action'] ?? '');
195 + // phpcs:disable WordPress.Security.NonceVerification.Missing -- Passive logger reads core settings request after WordPress validates it.
196 + $optionPage = isset($_POST['option_page'])
197 + ? sanitize_text_field(wp_unslash($_POST['option_page']))
198 + : '';
199 + $action = isset($_POST['action'])
200 + ? sanitize_text_field(wp_unslash($_POST['action']))
201 + : '';
202 + // phpcs:enable WordPress.Security.NonceVerification.Missing
197 203
198 204 if ($optionPage && $action == 'update') {
199 205 Logtivity::log()
200 206 ->setAction('Settings Updated')
@@ -251,9 +257,11 @@
251 257 * @return string
252 258 */
253 259 private function getRequestMethod(): string
254 260 {
255 - return sanitize_text_field($_SERVER['REQUEST_METHOD'] ?? '');
261 + return isset($_SERVER['REQUEST_METHOD'])
262 + ? sanitize_text_field(wp_unslash($_SERVER['REQUEST_METHOD']))
263 + : '';
256 264 }
257 265
258 266 /**
259 267 * @param string $oldStructure