diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index e05fc01fd82..fd8f0a694fc 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -74,12 +74,24 @@ print "PHP disable_functions = "; $arrayoffunctionsdisabled = explode(',', ini_get('disable_functions')); $arrayoffunctionstodisable = explode(',', 'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals'); $arrayoffunctionstodisable2 = explode(',', 'exec,passthru,shell_exec,system,proc_open,popen'); -print join(', ', $arrayoffunctionsdisabled); +$i = 0; +foreach ($arrayoffunctionsdisabled as $functionkey) { + if ($i > 0) { + print ', '; + } + print ''.$functionkey.''; + $i++; +} print "
\n"; $todisabletext = ''; +$i = 0; foreach ($arrayoffunctionstodisable as $functiontodisable) { if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) { - $todisabletext .= img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.$functiontodisable; + if ($i > 0) { + $todisabletext .= ', '; + } + $todisabletext .= img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.$functiontodisable.''; + $i++; } } if ($todisabletext) { @@ -87,9 +99,14 @@ if ($todisabletext) { print '
'; } $todisabletext = ''; +$i = 0; foreach ($arrayoffunctionstodisable2 as $functiontodisable) { if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) { - $todisabletext .= img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.$functiontodisable; + if ($i > 0) { + $todisabletext .= ', '; + } + $todisabletext .= img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.$functiontodisable.''; + $i++; } } if ($todisabletext) { @@ -172,7 +189,11 @@ $test = empty($conf->syslog->enabled); if ($test) { print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotRiskOfLeakWithThis"); } else { - print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedMayExposeInformation", $langs->transnoentities("Syslog")); + if ($conf->global->SYSLOG_LEVEL > LOG_NOTICE) { + print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedMayExposeInformation", $langs->transnoentities("Syslog")); + } else { + print img_picto('', 'tick.png').' '.$langs->trans("ModuleSyslogActivatedButLevelNotTooVerbose", $langs->transnoentities("Syslog"), $conf->global->SYSLOG_LEVEL); + } //print ' '.$langs->trans("MoreInformation").' XDebug admin page'; } print '
'; @@ -199,12 +220,12 @@ if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') { print 'MAIN_SECURITY_SALT = '.(empty($conf->global->MAIN_SECURITY_SALT) ? $langs->trans("Undefined") : $conf->global->MAIN_SECURITY_SALT).'
'; } if ($conf->global->MAIN_SECURITY_HASH_ALGO != 'password_hash') { - print 'The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible.
'; + print '
The recommanded value for MAIN_SECURITY_HASH_ALGO is now \'password_hash\' but setting it now will make ALL existing passwords of all users not valid, so update is not possible.
'; print 'If you really want to switch, you must:
'; print '- Go on home - setup - other and add constant MAIN_SECURITY_HASH_ALGO to value \'password_hash\'
'; print '- In same session, WITHOUT LOGGING OUT, go into your admin user record and set a new password
'; print '- You can now logout and login with this new password. You must now reset password of all other users.
'; - print '
'; + print '

'; } print '
'; // TODO @@ -227,12 +248,17 @@ $eventstolog = $securityevent->eventstolog; print ''.$langs->trans("LogEvents").': '; // Loop on each event type +$i = 0; foreach ($eventstolog as $key => $arr) { if ($arr['id']) { $key = 'MAIN_LOGEVENTS_'.$arr['id']; $value = empty($conf->global->$key) ? '' : $conf->global->$key; if ($value) { - print $key.', '; + if ($i > 0) { + print ', '; + } + print ''.$key.''; + $i++; } } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 202f11f7f46..cec1e07b823 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2060,6 +2060,7 @@ UseDebugBar=Use the debug bar DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramaticaly output ModuleActivated=Module %s is activated and slows the interface +ModuleSyslogActivatedButLevelNotTooVerbose=Module %s is activated and log level (%s) is correct (not too verbose) IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. AntivirusEnabledOnUpload=Antivirus enabled on uploaded files EXPORTS_SHARE_MODELS=Export models are share with everybody @@ -2113,4 +2114,4 @@ ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by MailToSendEventOrganization=Event Organization AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form YouShouldDisablePHPFunctions=You should disable PHP functions -IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job for example), you shoud disable PHP functions +IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions