diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b34dab69e..19e66e5ea 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,8 @@ # Release Notes +### 4.1.2 (August 17, 2022) +* Fixed an issue where leading whitespace could cause corrupted xml output resulting in failed calls. [#621] + ### 4.1.1 (August 14, 2022) * Use the current logged-in users' settings for the Admin Portal. This suppresses the Twilio error for Zonal Yap Servers for service bodies. [#614] * Missed call summary metric for reports [#611] diff --git a/legacy/_includes/functions.php b/legacy/_includes/functions.php index f997f35d8..bdd71a945 100644 --- a/legacy/_includes/functions.php +++ b/legacy/_includes/functions.php @@ -18,7 +18,7 @@ require_once 'migrations.php'; require_once 'queries.php'; require_once 'logging.php'; -$GLOBALS['version'] = "4.1.1"; +$GLOBALS['version'] = "4.1.2"; $GLOBALS['settings_allowlist'] = [ 'announce_servicebody_volunteer_routing' => [ 'description' => '' , 'default' => false, 'overridable' => true, 'hidden' => false], 'blocklist' => [ 'description' => 'Allows for blocking a specific list of phone numbers https://github.com/bmlt-enabled/yap/wiki/Blocklist' , 'default' => '', 'overridable' => true, 'hidden' => false], diff --git a/legacy/_includes/session.php b/legacy/_includes/session.php index 1e21f05d5..a8a7b2be6 100644 --- a/legacy/_includes/session.php +++ b/legacy/_includes/session.php @@ -1,44 +1,44 @@ - 0) { - $service_body_config = getServiceBodyConfig($service_body_id); + 0) { + $service_body_config = getServiceBodyConfig($service_body_id); - if (isset($service_body_config)) { - foreach ($service_body_config as $item => $value) { - if (($item == "twilio_account_sid" || $item == "twilio_auth_token") && isset($_SESSION['call_state'])) { - continue; - } - $_SESSION["override_" . $item] = $value; - } - } - } - } + if (isset($service_body_config)) { + foreach ($service_body_config as $item => $value) { + if (($item == "twilio_account_sid" || $item == "twilio_auth_token") && isset($_SESSION['call_state'])) { + continue; + } + $_SESSION["override_" . $item] = $value; + } + } + } +} - if (!isset($_SESSION['override_service_body_id'])) { - $service_body_id = 0; - if (isset($_REQUEST["service_body_id"]) || isset($_REQUEST["override_service_body_id"])) { - $service_body_id = isset($_REQUEST["service_body_id"]) ? $_REQUEST["service_body_id"] : $_REQUEST["override_service_body_id"]; - } elseif (isset($_REQUEST["override_service_body_config_id"])) { - $service_body_id = $_REQUEST["override_service_body_config_id"]; - } +if (!isset($_SESSION['override_service_body_id'])) { + $service_body_id = 0; + if (isset($_REQUEST["service_body_id"]) || isset($_REQUEST["override_service_body_id"])) { + $service_body_id = isset($_REQUEST["service_body_id"]) ? $_REQUEST["service_body_id"] : $_REQUEST["override_service_body_id"]; + } elseif (isset($_REQUEST["override_service_body_config_id"])) { + $service_body_id = $_REQUEST["override_service_body_config_id"]; + } - setConfigForService($service_body_id); - } + setConfigForService($service_body_id); +} - if (!isset($_SESSION['call_state'])) { - $_SESSION['call_state'] = "STARTED"; - } +if (!isset($_SESSION['call_state'])) { + $_SESSION['call_state'] = "STARTED"; +} - if (!isset($_SESSION['initial_webhook'])) { - $webhook_array = explode("/", $_SERVER['REQUEST_URI']); - $_SESSION['initial_webhook'] = str_replace("&", "&", $webhook_array[count($webhook_array) - 1]); - } +if (!isset($_SESSION['initial_webhook'])) { + $webhook_array = explode("/", $_SERVER['REQUEST_URI']); + $_SESSION['initial_webhook'] = str_replace("&", "&", $webhook_array[count($webhook_array) - 1]); +} - if (isset($_REQUEST)) { - foreach ($_REQUEST as $key => $value) { - if (str_exists($key, "override_")) { - $_SESSION[$key] = $value; - } - } - } +if (isset($_REQUEST)) { + foreach ($_REQUEST as $key => $value) { + if (str_exists($key, "override_")) { + $_SESSION[$key] = $value; + } + } +}