Another method (similar to previous) is to make your own Plugin, its very simple we have the code for you here.
Simply open a new PHP file using a simple note or text editor and paste the following code inside:
<?php /* Plugin Name: Block Bad Queries Description: Protect WordPress Against Malicious URL Requests */ global $user_ID; if($user_ID) { if(!current_user_can('level_10')) { if (strlen($_SERVER['REQUEST_URI']) > 255 || strpos($_SERVER['REQUEST_URI'], "eval(") || strpos($_SERVER['REQUEST_URI'], "CONCAT") || strpos($_SERVER['REQUEST_URI'], "UNION SELECT") || strpos($_SERVER['REQUEST_URI'], "base64")) { @header("HTTP/1.1 414 Request-URI Too Long"); @header("Status: 414 Request-URI Too Long"); @header("Connection: Close"); @exit; } } } ?>
Save this file as miltonmarketingprotect.php and upload it in your plugin directory /wp-content/plugins/ and your done.
This script will check for long strings as well as base64 code which was in the last attack and the eval ( code which could be a threat in the future.) 🙂
Once activated, this plugin will silently and effectively close any connections for these sorts of injection-type attacks.
Related Posts:
Create a PayPal Donation Shortcode – WordPress
Show Post Thumbnails in RSS Feed – WordPress
Disable the Admin Bar in WordPress
Formatting Text in WordPress Posts (Tiny MCE Advanced for WordPress)
Should I Choose a Hosted or Non-hosted Blogging Platform?
How do I start a WordPress blog? (hosting wordpress)
The background-color CSS property
How do I install plugins in WordPress?
Paginate Your WordPress Site Without Plugins
Redirect New Registered Users to a Specific Page – WordPress
How do I create money online using WordPress?