Done !
| Server IP : 54.36.91.62 / Your IP : 216.73.216.38 Web Server : Apache System : Linux webm008.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : awaywithxm ( 25098) PHP Version : 7.0.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/awaywithxm/www/wp-content/plugins/secupress/inc/modules/firewall/plugins/ |
Upload File : |
<?php
/**
* Module Name: Block Bad URL Contents
* Description: Block requests containing bad keywords in URL.
* Main Module: firewall
* Author: SecuPress
* Version: 1.1
*/
defined( 'SECUPRESS_VERSION' ) or die( 'Cheatin’ uh?' );
add_action( 'secupress.plugins.loaded', 'secupress_block_bad_url_contents', 5 );
/**
* Filter the query string to block the request or not
*
* @since 1.0
*/
function secupress_block_bad_url_contents() {
secupress_block_bad_content_but_what( 'url', 'QUERY_STRING', 'BUC' );
secupress_block_bad_content_but_what( 'host', 'REMOTE_HOST', 'BHC' );
secupress_block_bad_content_but_what( 'referer', 'HTTP_REFERER', 'BRC' );
}
add_filter( 'secupress.options.load_plugins_network_options', 'secupress_block_bad_url_contents_autoload_options' );
/**
* Add the option(s) we use in this plugin to be autoloaded.
*
* @since 1.3
* @author Grégory Viguier
*
* @param (array) $option_names An array of network option names.
*
* @return (array)
*/
function secupress_block_bad_url_contents_autoload_options( $option_names ) {
$option_names[] = 'secupress_firewall_settings';
return $option_names;
}