From 6c207a83742bde3d911decf0907c7da07ec8fbb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Mon, 20 Feb 2017 15:01:09 +0100 Subject: [PATCH 1/4] Update phpinfo.php --- e107_admin/phpinfo.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/e107_admin/phpinfo.php b/e107_admin/phpinfo.php index cc6e5eade..ca94d2597 100644 --- a/e107_admin/phpinfo.php +++ b/e107_admin/phpinfo.php @@ -15,6 +15,9 @@ if(!getperms("0")) e107::redirect('admin'); exit; } + +e107::coreLan('phpinfo', true); + $e_sub_cat = 'phpinfo'; require_once("auth.php"); @@ -38,11 +41,11 @@ $phpinfo = preg_replace('/]*>/i', ' 'If you have Curl enabled, you should consider disabling this feature.', - "allow_url_include" => 'This is a security risk and is not needed by e107.', - "display_errors" => 'On a production server, it is better to disable the displaying of errors in the browser.', - "expose_php" => 'Disabling this will hide your PHP version from browsers.', - "register_globals" => 'This is a security risk and should be disabled.' + "allow_url_fopen" => PHP_LAN_1, + "allow_url_include" => PHP_LAN_2, + "display_errors" => PHP_LAN_3, + "expose_php" => PHP_LAN_4, + "register_globals" => PHP_LAN_5 ); foreach($security_risks as $risk=>$diz) @@ -62,7 +65,7 @@ $security_risks = array( { if(!is_writable($sessionSavePath) && $sessionSaveMethod === 'files') { - $mes->addError("session.save_path is not writable! That can cause major issues with your site."); + $mes->addError("session.save_path ".PHP_LAN_6); } } @@ -78,4 +81,4 @@ if(deftrue('e_DEBUG')) $ns->tablerender("PHPInfo", $mes->render(). $phpinfo); require_once("footer.php"); -?> \ No newline at end of file +?> From 843c2f82c8ef74c8547cc30ebc124a958bc7da6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Mon, 20 Feb 2017 15:04:11 +0100 Subject: [PATCH 2/4] Create lan_phpinfo.php --- e107_languages/English/admin/lan_phpinfo.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 e107_languages/English/admin/lan_phpinfo.php diff --git a/e107_languages/English/admin/lan_phpinfo.php b/e107_languages/English/admin/lan_phpinfo.php new file mode 100644 index 000000000..59c7a5753 --- /dev/null +++ b/e107_languages/English/admin/lan_phpinfo.php @@ -0,0 +1,19 @@ + From 64415eb8bbe0735921d66bbb9139d1fb1872a956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Wed, 22 Feb 2017 09:43:10 +0100 Subject: [PATCH 3/4] Update phpinfo.php --- e107_admin/phpinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_admin/phpinfo.php b/e107_admin/phpinfo.php index ca94d2597..66b852823 100644 --- a/e107_admin/phpinfo.php +++ b/e107_admin/phpinfo.php @@ -65,7 +65,7 @@ $security_risks = array( { if(!is_writable($sessionSavePath) && $sessionSaveMethod === 'files') { - $mes->addError("session.save_path ".PHP_LAN_6); + $mes->addError(e107::getParser()->toHTML(PHP_LAN_6, true)); } } From 1fce6c29d91506cb09db6656713bba993b50f69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Wed, 22 Feb 2017 09:43:41 +0100 Subject: [PATCH 4/4] Update lan_phpinfo.php --- e107_languages/English/admin/lan_phpinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_languages/English/admin/lan_phpinfo.php b/e107_languages/English/admin/lan_phpinfo.php index 59c7a5753..bead1ad98 100644 --- a/e107_languages/English/admin/lan_phpinfo.php +++ b/e107_languages/English/admin/lan_phpinfo.php @@ -15,5 +15,5 @@ define("PHP_LAN_2", "This is a security risk and is not needed by e107."); define("PHP_LAN_3", "On a production server, it is better to disable the displaying of errors in the browser."); define("PHP_LAN_4", "Disabling this will hide your PHP version from browsers."); define("PHP_LAN_5", "This is a security risk and should be disabled."); -define("PHP_LAN_6", "is not writable! That can cause major issues with your site."); +define("PHP_LAN_6", "[b]session.save_path[/b] is not writable! That can cause major issues with your site."); ?>