mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
fix buglets in new authentication code (issue #4860)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -139,7 +139,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!strcmp(passwd, buf)) {
|
if (!strcmp(passwd, buf)) {
|
||||||
if (strchr(opts, 'a'))
|
if (strchr(opts, 'a'))
|
||||||
ast_cdr_setaccount(chan, buf);
|
ast_cdr_setaccount(chan, buf);
|
||||||
break;
|
break;
|
||||||
@@ -150,7 +150,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
|
|||||||
fclose(f);
|
fclose(f);
|
||||||
if (!ast_strlen_zero(buf)) {
|
if (!ast_strlen_zero(buf)) {
|
||||||
if (strchr(opts, 'm')) {
|
if (strchr(opts, 'm')) {
|
||||||
if (!strcmp(md5passwd, md5secret))
|
if (md5secret && !strcmp(md5passwd, md5secret))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if (!strcmp(passwd, buf))
|
if (!strcmp(passwd, buf))
|
||||||
@@ -168,7 +168,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
|
|||||||
prompt="auth-incorrect";
|
prompt="auth-incorrect";
|
||||||
}
|
}
|
||||||
if ((retries < 3) && !res) {
|
if ((retries < 3) && !res) {
|
||||||
if (strchr(opts, 'a'))
|
if (strchr(opts, 'a') && !strchr(opts, 'm'))
|
||||||
ast_cdr_setaccount(chan, passwd);
|
ast_cdr_setaccount(chan, passwd);
|
||||||
res = ast_streamfile(chan, "auth-thankyou", chan->language);
|
res = ast_streamfile(chan, "auth-thankyou", chan->language);
|
||||||
if (!res)
|
if (!res)
|
||||||
|
Reference in New Issue
Block a user