Outbound caller id number - only allow numeric and +

This commit is contained in:
FusionPBX 2021-10-20 10:58:23 -06:00 committed by GitHub
parent 0c91ac4feb
commit 1df0ade6cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
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):
@ -135,6 +135,11 @@
$enabled = $_POST["enabled"];
$description = $_POST["description"];
//outbound caller id number - only allow numeric and +
if (strlen($outbound_caller_id_number) > 0) {
$outbound_caller_id_number = preg_replace('#[^\+0-9]#', '', $outbound_caller_id_number);
}
$voicemail_id = $extension;
if (permission_exists('number_alias') && strlen($number_alias) > 0) {
$voicemail_id = $number_alias;
@ -796,6 +801,11 @@
}
unset($sql, $parameters, $row);
//outbound caller id number - only allow numeric and +
if (strlen($outbound_caller_id_number) > 0) {
$outbound_caller_id_number = preg_replace('#[^\+0-9]#', '', $outbound_caller_id_number);
}
//get the voicemail data
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
//get the voicemails