From 8cdecff02285888b572df40723c3aeb50e16ee01 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 5 Mar 2015 18:22:04 -0500 Subject: [PATCH] Fixed Billing::GetClientInstanceId() --- airtime_mvc/application/common/Billing.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/common/Billing.php b/airtime_mvc/application/common/Billing.php index 6753f2326..8927cbc73 100644 --- a/airtime_mvc/application/common/Billing.php +++ b/airtime_mvc/application/common/Billing.php @@ -19,7 +19,10 @@ class Billing //XXX: Major hack attack. Since this function gets called often, rather than querying WHMCS // we're just going to extract it from airtime.conf since it's the same as the rabbitmq username. $CC_CONFIG = Config::getConfig(); - $instanceId = $CC_CONFIG['rabbitmq']['username']; + $instanceId = $CC_CONFIG['rabbitmq']['user']; + if (!is_numeric($instanceId)) { + throw new Exception("Invalid instance id in " . __FUNCTION__ . ": " . $instanceId); + } return $instanceId; }