FreePBX / issue-tracker

The unified FreePBX issue tracker.
https://www.freepbx.org
GNU General Public License v3.0
12 stars 1 forks source link

[bug]: Commercial Endpoint Manager on 17 Whoops / Yealink Phones #352

Closed chewy-chewbacca closed 3 months ago

chewy-chewbacca commented 3 months ago

FreePBX Version

FreePBX 17

Issue Description

Receiving an [undefined array key "user"] error accessing any part of Endpoint manager. Had success with Sangoma-only (free EPM) install and restores, however this is the commercial license with Yealink phones.

Operating Environment

FreePBX 17, Debian 12, fresh install at Vultr, restored up to date 16 configuration.

Relevant log output

/var/www/html/admin/modules/endpoint/functions.inc/functions_common.php
Arguments
"Undefined array key "user""
Environment & details:
GET Data
display 
"endpoint"
POST Data empty
Files empty
Cookies
lang    
"en_US"
searchHide  
"1"
PHPSESSID   
"u723q98pl3kfj648313nnd4kpq"
_ga 
"GA1.1.784222603.1723116523"
_gid    
"GA1.1.1773286997.1723116523"
Session
langdirection   
"ltr"
module_name 
"dashboard"
module_page 
"index"
AMP_user    
ampuser {#1}
Server/Request Data
SCRIPT_URL  
"/admin/config.php"
SCRIPT_URI  
"http://redacted/admin/config.php"
SSLSETUP    
"true"
HTACCESS    
"on"
HTTP_HOST   
"redacted"
HTTP_CONNECTION 
"keep-alive"
HTTP_UPGRADE_INSECURE_REQUESTS  
"1"
HTTP_USER_AGENT 
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
HTTP_ACCEPT 
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
HTTP_REFERER    
"http://redacted/admin/config.php?display=index"
HTTP_ACCEPT_ENCODING    
"gzip, deflate"
HTTP_ACCEPT_LANGUAGE    
"en-US,en;q=0.9"
HTTP_COOKIE 
"lang=en_US; searchHide=1; PHPSESSID=u723q98pl3kfj648313nnd4kpq; _ga=GA1.1.784222603.1723116523; _gid=GA1.1.1773286997.1723116523"
PATH    
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
SERVER_SIGNATURE    
""
SERVER_SOFTWARE 
"Apache"
SERVER_NAME 
"redacted"
SERVER_ADDR 
"redacted"
SERVER_PORT 
"80"
REMOTE_ADDR 
"redacted"
DOCUMENT_ROOT   
"/var/www/html"
REQUEST_SCHEME  
"http"
CONTEXT_PREFIX  
""
CONTEXT_DOCUMENT_ROOT   
"/var/www/html"
SERVER_ADMIN    
"[no address given]"
SCRIPT_FILENAME 
"/var/www/html/admin/config.php"
REMOTE_PORT 
"16518"
GATEWAY_INTERFACE   
"CGI/1.1"
SERVER_PROTOCOL 
"HTTP/1.1"
REQUEST_METHOD  
"GET"
QUERY_STRING    
"display=endpoint"
REQUEST_URI 
"/admin/config.php?display=endpoint"
SCRIPT_NAME 
"/admin/config.php"
PHP_SELF    
"/admin/config.php"
REQUEST_TIME_FLOAT  
1723122890.238
REQUEST_TIME    
1723122890
Environment Variables empty
Registered Handlers
0. Whoops\Handler\PrettyPageHandler

Stack frames (6)
5
Whoops\Exception\ErrorException 
/var/www/html/admin/modules/endpoint/functions.inc/functions_common.php4282
4
Whoops\Run handleError
/var/www/html/admin/modules/endpoint/functions.inc/functions_common.php4282
3
 endpoint_blankConfigVariables
/var/www/html/admin/modules/endpoint/functions.inc/functions_yealink.php668
2
 endpoint_write_yealink_commons
/var/www/html/admin/modules/endpoint/views/page.endpoint.php117
1
 unknown
/var/www/html/admin/modules/endpoint/page.endpoint.php10
0
 include
/var/www/html/admin/config.php658

endpoint_write_yealink_commons
/var/www/html/admin/modules/endpoint/functions.inc/functions_yealink.php
KGkQ+X9PicQO3Bu6imrE/X5plIhZZHcQKZEXM8qcdFHAFu2gOlStVk7U+YdDVBDm9FCrdR9jb7hN
5jPt1315VRpoGJ1RgOBnwmpQH2+qbneI6AXojuWRKfSaV76TN07A4WA1Xzb+q+LlNlw6HgcLq9br
4FJEy1j8yWB+yc9eobj6SmQGJQkMyOoP/x5zy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cYGdH2HOa73D6BJs6Ed7xZ4T+U1QcpM2n6EzR+3v9RVb1KkYiwNI1ZqWe
O+ocO/3XFpalqcc6M9P95qNKetaWbITbEjYAs98sJ6OX/fcugCjdn0T/OTJmAucRY3kQIhBcwjPm
20v6yTi0OXuYlbNEtlgpR4ozdhA3JHt9qAsdC0v6cvauaE3PTzGRz4/9xH/5oXCG/n1Pl3FB1i8z
hvF1JVF/d5VtVqc9b5z1VKx2clNF0emuaPh4akS4uT5GmYXvifL8Vz4bVbqI5bW0Meu75okebCU7
wk+OQZ1EtewKjBsBOipkz0kXfKWIPDMg4d34k++hbsUk77K1HOQVP8IWmnKPbvGdLzkMqHLnB2wG
VB3pptYItjrkxzxWSSxnyV92IRkoI4fTXQn/HZrHaBoLRkjCi6X7+KzS+SCtPDJra5pHx6cE7o3i
LdNUXpVcJAYD3Q9cPbtuIN6P2vXbtiD0dYSahAExSQ5UXdbZ2xDdOJJLPcbsnMG7WvqFH9+nTpYn
VEm910Jlz9YPmr11WeFdWU0/rgAfmJHWi2RwavzjJSZ5VpTwN2LiBQFBD5GglC6GAJjn5FB8JY9w
twywvUacZsr7NYLg7TuevigQVKJg1OianhoBr3X40Cdnf7xBkrT1hpS8B0ouO6UxAA/xPg7oIsAu
gJKVXDW6n7HKYTlWL8CbMHOPkE4j7vZM1Rok8p9pMVEO9r/qbkYFgPzwKS9/7qg7dHiHrlT/Pjn8

unknown
/var/www/html/admin/modules/endpoint/page.endpoint.php
<?php //0044b
// 0 @Ioncube;
// 
// EndPoint Manager 17.0.1.75
// Copyright 2024 by Sangoma Technologies Inc., All rights reserved
// 
// By installing, copying, downloading, distributing, inspecting or using
// the materials provided herewith, you agree to all of the terms of use as
// outlined in our End User Agreement which can be found and reviewed at
// https://www.freepbx.org/legal/
// 
if(extension_loaded('ionCube Loader')){die('The file '.__FILE__." is corrupted.\n");}echo("\nScript error: the ".(($cli=(php_sapi_name()=='cli')) ?'ionCube':'<a href="https://www.ioncube.com">ionCube</a>')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' <a href="https://get-loader.ioncube.com">get-loader.ioncube.com</a> and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' <a href="http://ioncu.be/LV">http://ioncu.be/LV</a> ')."\n\n");exit(199);
?>
HR+cPyTCxkWxbTBFmlbxoxjjYaQVJmS6OgfIvxIuZBlQzSPyu0V7/eY+Mz2uZL2Cl2aFjxLlWvMo
k3iT4l77/6GWK1TKZ5O4Gbgkeh9k5s8rIsPgu/yVmT1zTWZFFJBrsOuCRTD6Qfcb/33JcGYQRKkl
oZqDSYtQ2bzF3p/pf+VpGa1DhbS41HVrLwlw19WBJwNwUwb5i5ABccX6wRYF5FSo3zcbo9/NW+KX
MRiYrVjgTH7LoULDK8oqucTu7jBcZGK2seCMn57w/mBEX+nsJgeWpn8JLAnhlcwC6BV9NrbcFo9T
9KbJ0cmRamGrHfb4s2zBINAVLeuUuXGjTSwEYPeSzTXhjWz+CqtbT29ESlaQZv3RmGX6XH7d/b1e
e14jm9bJMQXq3cqR95ydXcmbNfpy4VYL09K0KhGSMjTCLmzM2tib718tLRFqPqso3KWvXWMKPd0A
UjVlEQszAhx82/K/kzx3otQgWO8XSR/9efGzCpK5wJxKQfNXDCI1Ld7R3mr7vjAF26pW8y4lhPwZ
CowxrpL2nPgaHTmhizAPp0Fdsx2aSUkP6zLMdqSzh2/VXgDyFYj2N7Nwtrv6fn5qLZ7f53TvNZYW

endpoint_blankConfigVariables
/var/www/html/admin/modules/endpoint/functions.inc/functions_yealink.php
KGkQ+X9PicQO3Bu6imrE/X5plIhZZHcQKZEXM8qcdFHAFu2gOlStVk7U+YdDVBDm9FCrdR9jb7hN
5jPt1315VRpoGJ1RgOBnwmpQH2+qbneI6AXojuWRKfSaV76TN07A4WA1Xzb+q+LlNlw6HgcLq9br
4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ADdh3IA4UqIP47t4RiAK
TIvaLll07bwof8zyVLhcYGdH2HOa73D6BJs6Ed7xZ4T+U1QcpM2n6EzR+3v9RVb1KkYiwNI1ZqWe
O+ocO/3XFpalqcc6M9P95qNKetaWbITbEjYAs98sJ6OX/fcugCjdn0T/OTJmAucRY3kQIhBcwjPm
20v6yTi0OXuYlbNEtlgpR4ozdhA3JHt9qAsdC0v6cvauaE3PTzGRz4/9xH/5oXCG/n1Pl3FB1i8z
hvF1JVF/d5VtVqc9b5z1VKx2clNF0emuaPh4akS4uT5GmYXvifL8Vz4bVbqI5bW0Meu75okebCU7
wk+OQZ1EtewKjBsBOipkz0kXfKWIPDMg4d34k++hbsUk77K1HOQVP8IWmnKPbvGdLzkMqHLnB2wG

include
/var/www/html/admin/config.php
                            }
                        }
                    }
                }
                if(isset($gpgstatus['status']) && ($gpgstatus['status'] & FreePBX\GPG::STATE_REVOKED)) {
                    echo sprintf(_("File %s has a revoked signature. Can not load"),$module_file);
                    break;
                } else {
                    // load language info if available
                    modgettext::textdomain($module_name);
                    if ( isset($currentcomponent) ) {
                        $bmo->GuiHooks->doGUIHooks($module_name, $currentcomponent);
                    }
                    if ($bmo->GuiHooks->needsIntercept($module_name, $module_file)) {
                        $bmo->Performance->Start("hooks-$module_name-$module_file");
                        $bmo->GuiHooks->doIntercept($module_name, $module_file);
                        $bmo->Performance->Stop("hooks-$module_name-$module_file");
                    } else {
                        $bmo->Performance->Start("includefile-$module_file");
                        include($module_file);
                        $bmo->Performance->Stop("includefile-$module_file");
                    }
                }
            } else {
                echo sprintf(_("404 Not found (%s)"),$module_file);
            }

            // BMO TODO: Post display hooks.
            $bmo->GuiHooks->getPostDisplay($module_name, $_REQUEST);

            // global component
            if ( isset($currentcomponent) ) {
                modgettext::textdomain($module_name);
                echo  $currentcomponent->generateconfigpage();
            }
        }
    break;
}

$header = array();
Arguments
"/var/www/html/admin/modules/endpoint/page.endpoint.php"
chewy-chewbacca commented 3 months ago

Also Whoops\Exception\ErrorException thrown with message "Undefined array key "user""

Stacktrace:

5 Whoops\Exception\ErrorException in /var/www/html/admin/modules/endpoint/functions.inc/functions_common.php:4282

4 Whoops\Run:handleError in /var/www/html/admin/modules/endpoint/functions.inc/functions_common.php:4282

3 endpoint_blankConfigVariables in /var/www/html/admin/modules/endpoint/functions.inc/functions_yealink.php:668

2 endpoint_write_yealink_commons in /var/www/html/admin/modules/endpoint/views/page.endpoint.php:117

1 unknown in /var/www/html/admin/modules/endpoint/page.endpoint.php:10

0 include in /var/www/html/admin/config.php:658

chewy-chewbacca commented 3 months ago

If I remove endpoint and reinstall, it's fine with an empty config. Only when the backup is restored does the error occur, FYI

Endpoint version 17.0.1.73, also tried edge 17.0.1.75. Same issue on either.

jissphilip commented 3 months ago

HI @chewy-chewbacca endpoint-17.0.1.76 Please update your system with given version and try

chewy-chewbacca commented 3 months ago

Works! Thank you!