]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_verto] allow re-auth via verto.login
authorMichael Jerris <mike@signalwire.com>
Tue, 9 Feb 2021 19:34:37 +0000 (19:34 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:01:04 +0000 (22:01 +0300)
src/mod/endpoints/mod_verto/mod_verto.c

index a8572f7a7610b91a9f7aed04dcd3cc79137c9081..3ae8913d04ca036eefc9fb9ededc921c6d2ac304 100644 (file)
@@ -1460,7 +1460,7 @@ static cJSON *process_jrpc(jsock_t *jsock, cJSON *json)
 
        jrpc_add_id(reply, id, "", 0);
 
-       if (!switch_test_flag(jsock, JPFLAG_AUTHED) && (jsock->profile->userauth || jsock->profile->root_passwd)) {
+       if ((!switch_test_flag(jsock, JPFLAG_AUTHED) || (method && !strcmp(method, "login"))) && (jsock->profile->userauth || jsock->profile->root_passwd)) {
                int code = CODE_AUTH_REQUIRED;
                char message[128] = "Authentication Required";