Nonces Csrf Protection

Use when handling any form submission, AJAX request, admin-post action, settings page, link that triggers an action, or any other user-initiated request in a WordPress plugin or theme. Generates nonces with wp_nonce_field / wp_create_nonce and verifies them with check_admin_referer, check_ajax_referer, or wp_verify_nonce, always paired with a capability check, to prevent CSRF. Apply proactively whenever code accepts or acts on a request.

wpultimatesecurity 6eba54d 3 files · 15.8 KB Updated

File contents

wpultimatesecurity/WordPress-Security-Skills/tree/main/skills/nonces-csrf-protection commit 6eba54dec4

Frequently asked questions

npx skillmds@latest add wpultimatesecurity/nonces-csrf-protection