mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
This removes an invalid warning message for an incorrectly entered pin, but more importantly removes an inapplicable check. If the first argument passed to app_authenticate does not contain a '/', the argument should be treated as the sole fixed "password" to match against and that is all. (Previous behavior was attempting to open a file based on the pin.)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -126,9 +126,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
|
|||||||
/* Compare against a fixed password */
|
/* Compare against a fixed password */
|
||||||
if (!strcmp(passwd, arglist.password))
|
if (!strcmp(passwd, arglist.password))
|
||||||
break;
|
break;
|
||||||
}
|
} else if (ast_test_flag(&flags,OPT_DATABASE)) {
|
||||||
|
|
||||||
if (ast_test_flag(&flags,OPT_DATABASE)) {
|
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
/* Compare against a database key */
|
/* Compare against a database key */
|
||||||
if (!ast_db_get(arglist.password + 1, passwd, tmp, sizeof(tmp))) {
|
if (!ast_db_get(arglist.password + 1, passwd, tmp, sizeof(tmp))) {
|
||||||
|
Reference in New Issue
Block a user