From ea744d31e28c03283ff6a6f2391a168b5fddbaf4 Mon Sep 17 00:00:00 2001 From: osaajani <> Date: Mon, 26 Sep 2022 17:31:32 +0200 Subject: [PATCH] Check phone exists on callback reception --- VERSION | 2 +- controllers/publics/Callback.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d2613df..ccedee9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.5.1 +v3.5.2 diff --git a/controllers/publics/Callback.php b/controllers/publics/Callback.php index a9c8fa0..aceed2d 100644 --- a/controllers/publics/Callback.php +++ b/controllers/publics/Callback.php @@ -155,6 +155,14 @@ use Monolog\Logger; { $this->logger->info('Callback reception call with adapter uid : ' . $adapter_uid); + $phone = $this->internal_phone->get_for_user($this->user['id'], $id_phone); + if (!$phone) + { + $this->logger->error('Callback reception use non existing phone : ' . $id_phone); + + return false; + } + //Search for an adapter $find_adapter = false; $adapters = $this->internal_adapter->list_adapters();