FIX delete ECM directory
This commit is contained in:
parent
5190bc0d04
commit
746a00047b
@ -1372,7 +1372,7 @@ function dol_delete_dir($dir, $nophperrors = 0)
|
||||
// Security:
|
||||
// We refuse transversal using .. and pipes into filenames.
|
||||
if (preg_match('/\.\./', $dir) || preg_match('/[<>|]/', $dir)) {
|
||||
dol_syslog("Refused to delete dir ".$dir, LOG_WARNING);
|
||||
dol_syslog("Refused to delete dir ".$dir.' (contains invalid char sequence)', LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -469,13 +469,14 @@ if ($action != 'edit' && $action != 'delete' && $action != 'deletefile') {
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
// Confirm remove file
|
||||
if ($action == 'deletefile') {
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.urlencode(GETPOST("section", 'alpha')).'&urlfile='.urlencode(GETPOST("urlfile")).($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile');
|
||||
}
|
||||
|
||||
// Confirm remove file
|
||||
if ($action == 'delete_dir') {
|
||||
// Confirm remove dir
|
||||
if ($action == 'delete' || $action == 'delete_dir') {
|
||||
$relativepathwithoutslash = preg_replace('/[\/]$/', '', $relativepath);
|
||||
|
||||
//Form to close proposal (signed or not)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user