Add 'ficheinter' to module security tests (#39180)

This commit is contained in:
Charlène Benke 2026-07-15 00:36:38 +02:00 committed by GitHub
parent d8a61e5200
commit 10492c5c81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,7 +194,7 @@ class DocumentController extends Controller
) {
if (isModEnabled($moduleName) && isset($conf->{$moduleName}->multidir_output[$entity])) {
// List of module supported in security tests (others are forbidden if not security test to check that document is owned by company is done)
if (in_array($moduleName, array('facture', 'invoice', 'commande', 'order', 'propal', 'ticket'))) {
if (in_array($moduleName, array('facture', 'invoice', 'commande', 'order', 'propal', 'ticket', 'ficheinter'))) {
$sql = "SELECT rowid, src_object_id, src_object_type FROM ".MAIN_DB_PREFIX.'ecm_files';
$sql .= " WHERE filename = '".$this->db->escape(basename($original_file))."'";
$sql .= " AND filepath = '".$this->db->escape(basename($tmparray['dir_output']).'/'.dirname($original_file))."'";