Remove check_str function call

This function has been deprecated.
This commit is contained in:
markjcrane
2025-11-01 20:55:23 -06:00
parent d97c3c5845
commit 1c61513e90
7 changed files with 36 additions and 32 deletions

View File

@@ -358,7 +358,7 @@
if (!$authorized) {
//access denied
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] provision attempt but failed http basic authentication for ".check_str($_REQUEST['mac']));
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] provision attempt but failed http basic authentication for ".$_REQUEST['mac']);
header('HTTP/1.0 401 Unauthorized');
header('WWW-Authenticate: Basic realm="'.$domain_name.'"');
unset($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']);
@@ -373,10 +373,10 @@
//if the password was defined in the settings then require the password.
if (!empty($provision['password'])) {
//deny access if the password doesn't match
if ($provision['password'] != check_str($_REQUEST['password'])) {
if ($provision['password'] != $_REQUEST['password'] ?? '') {
//log the failed auth attempt to the system, to be available for fail2ban.
openlog('FusionPBX', LOG_NDELAY, LOG_AUTH);
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] provision attempt bad password for ".check_str($_REQUEST['mac']));
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] provision attempt bad password for ".($_REQUEST['mac'] ?? ''));
closelog();
echo "access denied";
return;