* Qual: Fix 'SqlInjection' notices
# Qual: Fix 'SqlInjection' notices
Batch of 25 files with changes to fix 'SqlInjection' Notices
* Qual: Enhance SQL injection prevention in CodingPhpTest.php
Improved the SQL injection prevention mechanism in the CodingPhpTest.php file by adding a check for integer and float casts in the IN clause of SQL queries to avoid false positives.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
The SELECT of ExpenseReportLine::fetch() was missing a comma after the
"tcheck_file" column. The concatenated SQL became
"... tcheck_file pjt.rowid as projet_id ..." which is a syntax error, so
the query always failed and fetch() returned -1.
This broke loading a single expense report line, both in the UI (confirm
delete line in expensereport/card.php) and in the REST API
(PUT /expensereports/{id}/lines/{lineid}).
The column is now also qualified with its table alias (fde.) for
consistency with the other columns of the SELECT.
Add a PHPUnit test (ExpenseReportTest::testExpenseReportLineFetch) that
creates an expense report with a line and reloads it: it fails before
the fix and passes after.
* Add tcheck_file column to llx_expensereport_det table
* Add tcheck_file column to llx_expensereport_det
* Add tcheck_file property and update SQL queries
Added a new property 'tcheck_file' to track the check status of attached files and updated SQL queries to include this field.
* Update expensereportline.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>