mirror of
https://github.com/itflow-org/itflow
synced 2026-08-10 09:37:15 +00:00
Enforce client scoping on API expense reads and record updates
Fixes (expenses/read.php missing apiClientScopeSql), plus an unscoped UPDATE in contacts/update.php and follow-up writes firing on zero-row updates in assets/credentials.
This commit is contained in:
@@ -21,7 +21,7 @@ if (!empty($asset_id)) {
|
||||
$update_sql = mysqli_query($mysqli, "UPDATE assets SET asset_name = '$name', asset_description = '$description', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_uri = '$uri', asset_uri_2 = '$uri_2', asset_status = '$status', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_purchase_date = $purchase_date, asset_warranty_expire = $warranty_expire, asset_install_date = $install_date, asset_notes = '$notes' WHERE asset_id = $asset_id AND asset_client_id = $client_id LIMIT 1");
|
||||
|
||||
// Check insert & get insert ID
|
||||
if ($update_sql) {
|
||||
if ($update_sql && $asset_row) {
|
||||
$update_count = mysqli_affected_rows($mysqli);
|
||||
|
||||
// Update Primary Interface
|
||||
|
||||
Reference in New Issue
Block a user