A
A
av_tyschenko2016-02-28 16:32:50
Information Security
av_tyschenko, 2016-02-28 16:32:50

$_POST which function in WordPress can be checked for security?

Friends, I have an AJAX handler that runs from a JS file, I can’t plug in the built-in security from WordPress.
What function can I check the POST data for the absence of any bad things in them? What would be easy to work with this data in the handler.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Ninja Mate, 2016-02-28
@av_tyschenko

wp_verify_nonce( $nonce, 'myajax-nonce' )) to verify the source
sanitize_text_field(); in order to remove all sorts of kveri

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question