fix: correct base64 encoding usage for projectId and clientId in SQL queries
This commit is contained in:
@@ -72,8 +72,9 @@ class CounterServer extends IPSModule
|
|||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
" . $this->esc($projectId) . "',
|
" . $this->esc($projectId) . "',
|
||||||
'" . $this->esc(base64_encode($projectId.$clientId . '_' . $counterId)) . "',
|
|
||||||
'" . $this->esc($counterId) . "',
|
'" . $this->esc($counterId) . "',
|
||||||
|
'" . $this->base64_encode($projectId.$clientId . '_' . $counterId). "',
|
||||||
|
|
||||||
'" . $this->esc($clientId) . "',
|
'" . $this->esc($clientId) . "',
|
||||||
'" . $this->esc($clientName) . "',
|
'" . $this->esc($clientName) . "',
|
||||||
'" . $this->esc($type) . "',
|
'" . $this->esc($type) . "',
|
||||||
@@ -94,7 +95,7 @@ class CounterServer extends IPSModule
|
|||||||
// ---------- GET meter_id ----------
|
// ---------- GET meter_id ----------
|
||||||
$sqlGet = "
|
$sqlGet = "
|
||||||
SELECT id FROM meter_devices
|
SELECT id FROM meter_devices
|
||||||
WHERE meter_uuid = '" . $this->esc(base64_encode($projectId.$clientId . '_' . $counterId)) . "'
|
WHERE meter_uuid = '" . $this->base64_encode($projectId.$clientId . '_' . $counterId). "'
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user