From 663cb20ee3bd62a9512bdd29a2313ec567ae0892 Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Sat, 16 Nov 2019 23:12:24 -0700 Subject: [PATCH] Set open_basedir to restrict file access to the current directory --- index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.php b/index.php index 9592e9a..332b289 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,9 @@ use Slim\Views\Twig; require __DIR__ . '/vendor/autoload.php'; +/** Set some restrictions */ +ini_set('open_basedir', __DIR__); + /** Initialize environment variable handler */ $dotenv = Dotenv::create(__DIR__); $dotenv->load();