mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-12 20:12:43 +01:00
Merge pull request #29231 from hregis/fix_14_security
FIX avoid to delete "lock" and "unlock" files
This commit is contained in:
@@ -96,14 +96,14 @@ class Utils
|
||||
if ($choice == 'allfiles') {
|
||||
// Delete all files (except install.lock, do not follow symbolic links)
|
||||
if ($dolibarr_main_data_root) {
|
||||
$filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);
|
||||
$filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($choice == 'logfile' || $choice == 'logfiles') {
|
||||
// Define files log
|
||||
if ($dolibarr_main_data_root) {
|
||||
$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 0, '.*\.log[\.0-9]*(\.gz)?$', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);
|
||||
$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 0, '.*\.log[\.0-9]*(\.gz)?$', '(\.lock|\.unlock)$', 'name', SORT_ASC, 0, 0, '', 1);
|
||||
}
|
||||
|
||||
if (!empty($conf->syslog->enabled)) {
|
||||
|
||||
Reference in New Issue
Block a user