From 02274367253ac2dc0100da8c179c3c6168f80e9c Mon Sep 17 00:00:00 2001 From: Victor Bocharsky Date: Thu, 1 Jun 2017 23:32:36 +0300 Subject: [PATCH 1/2] Order namespaces in app_dev.php --- web/app_dev.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app_dev.php b/web/app_dev.php index b108119742..c7d2fe3147 100644 --- a/web/app_dev.php +++ b/web/app_dev.php @@ -1,7 +1,7 @@ Date: Thu, 1 Jun 2017 23:35:49 +0300 Subject: [PATCH 2/2] Use strict comparison for in_array() We already do it in AppKernel: https://github.com/symfony/symfony-standard/blob/3.3/app/AppKernel.php#L21 --- web/app_dev.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app_dev.php b/web/app_dev.php index c7d2fe3147..6bbc5e128a 100644 --- a/web/app_dev.php +++ b/web/app_dev.php @@ -12,7 +12,7 @@ // Feel free to remove this, extend it, or make something more sophisticated. if (isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) - || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1']) || PHP_SAPI === 'cli-server') + || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'], true) || PHP_SAPI === 'cli-server') ) { header('HTTP/1.0 403 Forbidden'); exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');