mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Remove check_str function call
This function has been deprecated.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user