diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 3b655f726f7..7f50eaabd7e 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -93,7 +93,7 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ($action == 'delete') { $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid); - $file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). + $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $ret=dol_delete_file($file,0,0,0,$act); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');