Fix SQL injection risk in booking sync pickup_bool

This commit is contained in:
Jeppe B
2026-06-01 23:02:28 +02:00
parent 4945abfd8e
commit f2fc4f6f18
2 changed files with 3 additions and 2 deletions
@@ -200,6 +200,7 @@ class bookings_o extends db
$washCertificateStatus = $db->escape_string($washCertificateStatus);
$washCertificateUrl = $db->escape_string($washCertificateUrl);
$status = $db->escape_string($status);
$pickup_bool = (int)$pickup_bool;
// Check if the entry already exists
$sql = "SELECT * FROM $this->table WHERE id = $id";
$result = $db->query($sql);
+2 -2
View File
@@ -232,7 +232,7 @@ class bookingsRoute
(string)$booking['washCertificateEmail'],
(string)$booking['date'],
(string)$booking['department'],
(string)$booking['pickup_bool'],
(int)$booking['pickup_bool'],
(string)$booking['notes'],
(string)$booking['washCertificateStatus'],
(string)$booking['washCertificateUrl'],
@@ -530,4 +530,4 @@ class bookingsRoute
]
);
}
}
}