From e1c9c1c85a7e54b0a00f5b848efd005880f97660 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 13 Jul 2021 11:49:29 -0600 Subject: [PATCH] Trim the destinations in call forward. This will help prevent bugs caused by white spaces. --- app/calls/call_edit.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/calls/call_edit.php b/app/calls/call_edit.php index 56ec9d6c84..d32452d7a0 100644 --- a/app/calls/call_edit.php +++ b/app/calls/call_edit.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2020 + Portions created by the Initial Developer are Copyright (C) 2008-2021 the Initial Developer. All Rights Reserved. Contributor(s): @@ -173,6 +173,11 @@ //call forward config if (permission_exists('call_forward')) { + //trim hidden characters + $forward_all_destination = trim($forward_all_destination); + $forward_busy_destination = trim($forward_busy_destination); + $forward_no_answer_destination = trim($forward_no_answer_destination); + $forward_user_not_registered_destination = trim($forward_user_not_registered_destination); //sanitize the destinations $forward_all_destination = str_replace('$', '', $forward_all_destination); @@ -234,6 +239,8 @@ $destination_found = false; foreach ($destinations as $field) { if ($field['destination'] != '') { + //trim hidden characters + $field['destination'] = trim($field['destination']); //sanitize the destination $field['destination'] = str_replace('$', '', $field['destination']);