Merge pull request #1671 in FS/freeswitch from FS-11637 to master

* commit 'ea30fde496bd711f930d6f780213185e536c7980':
  FS-11637: [mod_verto] Fix crash on root login when no root-password is configured
This commit is contained in:
Andrey Volk 2019-01-30 14:54:26 +00:00
commit cb5962321d
1 changed files with 1 additions and 1 deletions

View File

@ -915,7 +915,7 @@ static switch_bool_t check_auth(jsock_t *jsock, cJSON *params, int *code, char *
}
if (!strcmp(login, "root")) {
if (!strcmp(login, "root") && jsock->profile->root_passwd) {
if (!(r = !strcmp(passwd, jsock->profile->root_passwd))) {
*code = CODE_AUTH_FAILED;
switch_snprintf(message, mlen, "Authentication Failure");