Update xml_cdr.php

This commit is contained in:
FusionPBX 2025-03-22 17:03:37 -06:00 committed by GitHub
parent cf55ca59ed
commit 7fae8eefca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -1668,7 +1668,7 @@
//authentication for xml cdr http post //authentication for xml cdr http post
if (!defined('STDIN')) { if (!defined('STDIN')) {
if ($this->settings->get('cdr', 'http_enabled')) { if ($this->settings->get('cdr', 'http_enabled', false)) {
//get the contents of xml_cdr.conf.xml //get the contents of xml_cdr.conf.xml
$conf_xml_string = file_get_contents($this->settings->get('switch', 'conf').'/autoload_configs/xml_cdr.conf.xml'); $conf_xml_string = file_get_contents($this->settings->get('switch', 'conf').'/autoload_configs/xml_cdr.conf.xml');
@ -1700,7 +1700,7 @@
//if http enabled is set to false then deny access //if http enabled is set to false then deny access
if (!defined('STDIN')) { if (!defined('STDIN')) {
if ($this->settings->get('cdr', 'http_enabled') == false) { if ($this->settings->get('cdr', 'http_enabled', false) {
openlog('FusionPBX', LOG_NDELAY, LOG_AUTH); openlog('FusionPBX', LOG_NDELAY, LOG_AUTH);
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR'].'] XML CDR import default setting http_enabled is not enabled. Line: '.__line__); syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR'].'] XML CDR import default setting http_enabled is not enabled. Line: '.__line__);
closelog(); closelog();
@ -1712,7 +1712,7 @@
//check for the correct username and password //check for the correct username and password
if (!defined('STDIN')) { if (!defined('STDIN')) {
if ($this->settings->get('cdr', 'http_enabled', true)) { if ($this->settings->get('cdr', 'http_enabled', false)) {
if ($auth_array[0] == $_SERVER["PHP_AUTH_USER"] && $auth_array[1] == $_SERVER["PHP_AUTH_PW"]) { if ($auth_array[0] == $_SERVER["PHP_AUTH_USER"] && $auth_array[1] == $_SERVER["PHP_AUTH_PW"]) {
//echo "access granted\n"; //echo "access granted\n";
$this->username = $auth_array[0]; $this->username = $auth_array[0];