diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-08-23 15:21:48 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-08-23 15:21:48 +0000 |
commit | 7cc45023c7522bf8c0ce28122bffc91fe3c1bc05 (patch) | |
tree | 96e74ce4951fcb5e064c5745735228d507df6277 | |
parent | bd6bd308992f078f9568422383d15969d8c467e6 (diff) |
fix buglets in new authentication code (issue #4860)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6380 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | apps/app_authenticate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c index 903e7b411..c9bbdf2ef 100755 --- a/apps/app_authenticate.c +++ b/apps/app_authenticate.c @@ -139,7 +139,7 @@ static int auth_exec(struct ast_channel *chan, void *data) break; } } else { - if(!strcmp(passwd, buf)) { + if (!strcmp(passwd, buf)) { if (strchr(opts, 'a')) ast_cdr_setaccount(chan, buf); break; @@ -150,7 +150,7 @@ static int auth_exec(struct ast_channel *chan, void *data) fclose(f); if (!ast_strlen_zero(buf)) { if (strchr(opts, 'm')) { - if (!strcmp(md5passwd, md5secret)) + if (md5secret && !strcmp(md5passwd, md5secret)) break; } else { if (!strcmp(passwd, buf)) @@ -168,7 +168,7 @@ static int auth_exec(struct ast_channel *chan, void *data) prompt="auth-incorrect"; } if ((retries < 3) && !res) { - if (strchr(opts, 'a')) + if (strchr(opts, 'a') && !strchr(opts, 'm')) ast_cdr_setaccount(chan, passwd); res = ast_streamfile(chan, "auth-thankyou", chan->language); if (!res) |