1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Merge pull request #2449 from yesszus/patch-6

Update  e107_admin/phpinfo
This commit is contained in:
Cameron
2017-03-10 09:26:30 -08:00
committed by GitHub
2 changed files with 29 additions and 7 deletions

View File

@@ -15,6 +15,9 @@ if(!getperms("0"))
e107::redirect('admin'); e107::redirect('admin');
exit; exit;
} }
e107::coreLan('phpinfo', true);
$e_sub_cat = 'phpinfo'; $e_sub_cat = 'phpinfo';
require_once("auth.php"); require_once("auth.php");
@@ -38,11 +41,11 @@ $phpinfo = preg_replace('/<table[^>]*>/i', '<table class="table table-striped ad
$mes = e107::getMessage(); $mes = e107::getMessage();
$security_risks = array( $security_risks = array(
"allow_url_fopen" => 'If you have Curl enabled, you should consider disabling this feature.', "allow_url_fopen" => PHP_LAN_1,
"allow_url_include" => 'This is a security risk and is not needed by e107.', "allow_url_include" => PHP_LAN_2,
"display_errors" => 'On a production server, it is better to disable the displaying of errors in the browser.', "display_errors" => PHP_LAN_3,
"expose_php" => 'Disabling this will hide your PHP version from browsers.', "expose_php" => PHP_LAN_4,
"register_globals" => 'This is a security risk and should be disabled.' "register_globals" => PHP_LAN_5
); );
foreach($security_risks as $risk=>$diz) foreach($security_risks as $risk=>$diz)
@@ -62,7 +65,7 @@ $security_risks = array(
{ {
if(!is_writable($sessionSavePath) && $sessionSaveMethod === 'files') if(!is_writable($sessionSavePath) && $sessionSaveMethod === 'files')
{ {
$mes->addError("<b>session.save_path</b> is not writable! That can cause major issues with your site."); $mes->addError(e107::getParser()->toHTML(PHP_LAN_6, true));
} }
} }
@@ -78,4 +81,4 @@ if(deftrue('e_DEBUG'))
$ns->tablerender("PHPInfo", $mes->render(). $phpinfo); $ns->tablerender("PHPInfo", $mes->render(). $phpinfo);
require_once("footer.php"); require_once("footer.php");
?> ?>

View File

@@ -0,0 +1,19 @@
<?php
/*
+--------------------------------------------------------------------------+
| e107 website content management system English Language File
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
| Last Modified: 2017/02/20 15:02:21
|
| $Author: Yesszus $
|
+--------------------------------------------------------------------------+
*/
define("PHP_LAN_1", "If you have Curl enabled, you should consider disabling this feature.");
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", "[b]session.save_path[/b] is not writable! That can cause major issues with your site.");
?>