Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Protect Your Site from Malicious Requests

global $user_ID; if($user_ID) {
    if(!current_user_can('administrator')) {
        if (strlen($_SERVER['REQUEST_URI']) > 255 ||
            stripos($_SERVER['REQUEST_URI'], "eval(") ||
            stripos($_SERVER['REQUEST_URI'], "CONCAT") ||
            stripos($_SERVER['REQUEST_URI'], "UNION+SELECT") ||
            stripos($_SERVER['REQUEST_URI'], "base64")) {
                @header("HTTP/1.1 414 Request-URI Too Long");
                @header("Status: 414 Request-URI Too Long");
                @header("Connection: Close");
                @exit;
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: Array unpacking support for string-keyed arrays - PHP 8.1 
Php :: cidblike ci3 
Php :: php header accept post request from same domain 
Php :: laravel session wont update 
Php :: RouteSubscriber disallow user routes 
Php :: confiruando passaport no laravel 
Php :: Primary Termmaatwebsite/excel store s3 
Php :: rename matomo php 
Php :: php preg_match html cross origin 
Php :: wp php get total product order quantity 
Php :: Attempt to read property "headers" on string 
Php :: deploy php composer with vercel.com 
Php :: menu order for posts 
Php :: Script to create AdminLTE in a Laravel project 
Php :: mongodb uploading csv php 
Php :: how to use php variable in javascript file 
Php :: whats is typecasting in php 
Php :: PHP Forms - Validate E-mail and URL 
Php :: small echo php 
Php :: contact us page mail prestashop 
Php :: php curl upload linkedin image 
Php :: php if class exists 
Php :: laravel 8 api validation 
Php :: laravel make model controller migration -mcr 
Php :: how to increase wp mailster attachment size 
Php :: Détecter les utilisateurs mobiles 
Php :: remove public/index.php from laravel url 
Php :: which song has the most curse words 
Php :: php check if variable is true or false 
Php :: Drupal get node id from view 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =