diff --git a/.gitignore b/.gitignore index 68b4719..1b4da35 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /templates_c/ /templates_c/** -.env \ No newline at end of file +.env +.htaccess \ No newline at end of file diff --git a/index.php b/index.php index 950b04a..72358a6 100644 --- a/index.php +++ b/index.php @@ -5,8 +5,8 @@ $dotenv = Dotenv\Dotenv::createImmutable(__DIR__); $dotenv->safeLoad(); - $strCtrl = $_GET['ctrl'] ?? 'project'; - $strMethod = $_GET['action'] ?? 'home'; + $strCtrl = preg_replace('/[^a-zA-Z]/', '', $_GET['ctrl'] ?? 'project'); + $strMethod = preg_replace('/[^a-zA-Z_]/', '', $_GET['action'] ?? 'home'); $strClassName = "Controllers\\" . ucfirst($strCtrl) . "Ctrl";