[mod_verto] allow re-auth via verto.login

This commit is contained in:
Michael Jerris 2021-02-09 19:34:37 +00:00 committed by Andrey Volk
parent 65ad502caf
commit 0fcdeffb0d
1 changed files with 1 additions and 1 deletions

View 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";