mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-03-27 11:25:30 -04:00
Fix review comments: remove redundant loop and add XSS escaping
- Remove redundant property assignment loop in Expenses.php - Add esc() to employee name values to prevent XSS vulnerabilities
This commit is contained in:
@@ -102,10 +102,6 @@ class Expenses extends Secure_Controller
|
||||
$data['employees'] = [];
|
||||
if ($can_assign_employee) {
|
||||
foreach ($this->employee->get_all()->getResult() as $employee) {
|
||||
foreach (get_object_vars($employee) as $property => $value) {
|
||||
$employee->$property = $value;
|
||||
}
|
||||
|
||||
$data['employees'][$employee->person_id] = $employee->first_name . ' ' . $employee->last_name;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user