Algorithms, Blockchain and Cloud

CloudFlare Blocks Suspicious URL


I have set the security level to high and the cloudflare will block suspicious URL, e.g. URL injection, if you type in something like https://helloacm.com/figlet/?url=abc+%7C+ls+-l, the page will be redirected to:

cloud-flare-block-security CloudFlare Blocks Suspicious URL

cloud-flare-block-security

This is because that the cloudflare thinks someone may try to break into your system by putting some commands. This normally can be prevented by escaping the command using php function escapeshellcmd or escapeshellarg which filters the shell command arguments.

You can also write a small function to filter out commands by using single quote:

function removeCmd($str) {
  return "'".str_replace('\'', '', $str)."'";
}

Bear in mind, security is very important.

–EOF (The Ultimate Computing & Technology Blog) —

225 words
Last Post: Freeware Chinese Chess Updated to 3.0.0.500 using XE8, 32-bit and UNICODE
Next Post: C/C++ Coding Exercise - Move Zeros

The Permanent URL is: CloudFlare Blocks Suspicious URL (AMP Version)

Exit mobile version