]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11637: [mod_verto] Fix crash on root login when no root-password is configured
authorMike Jerris <mike@signalwire.com>
Wed, 30 Jan 2019 14:40:51 +0000 (09:40 -0500)
committerMike Jerris <mike@signalwire.com>
Wed, 30 Jan 2019 14:40:51 +0000 (09:40 -0500)
src/mod/endpoints/mod_verto/mod_verto.c

index 6ad57d276021f2d77274b221513fa63e96b27fce..d48b53430e4257bd79865b140a24bfd0092d33bf 100644 (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");