Verify Nonces and Sanitize Input in WordPress AJAX Handlers
Verify nonces and sanitize input in WordPress AJAX handlers AJAX requests in WordPress go to admin-ajax.php, which any visitor can call. So every handler must check where the request comes from and what it contains. A CSRF attack makes the browser of a logged-in user send a forged request to your site; a nonce, a…