mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°6989 - Security hardening
This commit is contained in:
@@ -48,8 +48,9 @@ session_write_close();
|
||||
|
||||
$sTargetPage = APPROOT.'env-'.$sEnvironment.'/'.$sModule.'/'.$sPage;
|
||||
|
||||
if (!file_exists($sTargetPage))
|
||||
{
|
||||
if (!file_exists($sTargetPage)
|
||||
|| (strtolower(pathinfo($sTargetPage, PATHINFO_EXTENSION)) !== "php")
|
||||
) {
|
||||
// Do not recall the parameters (security takes precedence)
|
||||
echo "Wrong module, page name or environment...";
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user