N°6989 - Security hardening

This commit is contained in:
Molkobain
2023-11-22 18:02:50 +01:00
parent fc22d91232
commit 3b2da39469

View File

@@ -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;