How to secure my php forms

It’s not the code in the form, but how you process the form’s data. I put this in my main ‘include’ file; it sanitizes all input data. The key is to never trust the form data without verifying it is valid. This code helps in that. // this sanitizes all gets/posts for security $_GET = … Read more

Asking help regarding potential malware

Although this is not the place for hacking questions … a quick look seems to indicate attempts to get database credentials, and to upload files that can be executed later. One file it looks for (and tries to inlcude) is ‘command.php’. So take a look if that file is there. You could also look at … Read more

get_posts() SQL Injection

If not, how do I clean the incoming variables? In most cases you don’t, get_posts calls WP_Query internally, and WP_Query performs some sanitization, namely via wpdb->prepare. However, for what you’re trying to do, this is the wrong approach. Just use a standard search.php template with a standard post loop, and use input fields that have … Read more

Version of jQuery In WordPress Failing Security Audit

You can add the following in your functions.php file to deregister the old included jQuery and register the new jQuery. Using a newer version of jQuery might make some plugins stop working, so you’ll have to check to see if all your plugins will work with the newer version. function mytheme_register_scripts() { wp_deregister_script( ‘jquery’ ); … Read more