Merge pull request #25903 from JonBendtsen/develop

adding mariadb and mariadb-dump to the list of restricted os commands
This commit is contained in:
Laurent Destailleur 2023-09-13 23:07:48 +02:00 committed by GitHub
commit a74c2bfb8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -323,7 +323,7 @@ if (empty($dolibarr_main_restrict_os_commands)) {
} else {
print $dolibarr_main_restrict_os_commands;
}
print ' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", 'mysqldump, mysql, pg_dump, pgrestore, clamdscan').')</span>';
print ' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", 'mysqldump, mysql, pg_dump, pgrestore, mariadb, mariadb-dump, clamdscan').')</span>';
print '<br>';
if (empty($conf->global->SECURITY_DISABLE_TEST_ON_OBFUSCATED_CONF)) {

View file

@ -284,11 +284,11 @@ $dolibarr_main_prod='1';
// ==================================
// To restrict commands you can execute by the backup feature, enter allowed command here.
// Note: If you can, defining permission on OS linux (using SELinux for example) may be a better choice.
// Default value: 'mysqldump, mysql, pg_dump, pgrestore'
// Default value: 'mysqldump, mysql, pg_dump, pgrestore, mariadb, mariadb-dump'
// Examples:
// $dolibarr_main_restrict_os_commands='mysqldump, /usr/local/bin/otherdumptool';
//
$dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore';
$dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore, mariadb, mariadb-dump';
// dolibarr_main_restrict_ip
// =========================

View file

@ -920,7 +920,7 @@ function write_conf_file($conffile)
fputs($fp, '$dolibarr_main_force_https=\''.$main_force_https.'\';');
fputs($fp, "\n");
fputs($fp, '$dolibarr_main_restrict_os_commands=\'mysqldump, mysql, pg_dump, pgrestore, clamdscan, clamscan.exe\';');
fputs($fp, '$dolibarr_main_restrict_os_commands=\'mysqldump, mysql, pg_dump, pgrestore, mariadb, mariadb-dump, clamdscan, clamscan.exe\';');
fputs($fp, "\n");
fputs($fp, '$dolibarr_nocsrfcheck=\'0\';');