Merge pull request #36455 from Hystepik/fix-prevent-use-of-trace-method
Fix prevent use of TRACE REQUEST_METHOD in waf
This commit is contained in:
commit
0d5c63e6d4
1 changed files with 7 additions and 0 deletions
|
|
@ -309,6 +309,13 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type, $stopcode = 1)
|
|||
}
|
||||
}
|
||||
|
||||
// Prevent the use of method TRACE
|
||||
if ($_SERVER["REQUEST_METHOD"] == "TRACE") {
|
||||
print 'Access refused with request method TRACE';
|
||||
http_response_code(405);
|
||||
exit();
|
||||
}
|
||||
|
||||
// Sanity check on URL
|
||||
if (!defined('NOSCANPHPSELFFORINJECTION') && !empty($_SERVER["PHP_SELF"])) {
|
||||
$morevaltochecklikepost = array($_SERVER["PHP_SELF"]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue