An empty password is valid for username/password authentication so we should
allow password to be empty/not supplied.
Review: https://reviewboard.asterisk.org/r/3988
........
Merged revisions 423481 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423482 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423483
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
}
switch (auth->type) {
- case AST_SIP_AUTH_TYPE_USER_PASS:
- if (ast_strlen_zero(auth->auth_pass)) {
- ast_log(LOG_ERROR, "'userpass' authentication specified but no "
- "password specified for auth '%s'\n", ast_sorcery_object_get_id(auth));
- res = -1;
- }
- break;
case AST_SIP_AUTH_TYPE_MD5:
if (ast_strlen_zero(auth->md5_creds)) {
ast_log(LOG_ERROR, "'md5' authentication specified but no md5_cred "
res = -1;
}
break;
+ case AST_SIP_AUTH_TYPE_USER_PASS:
case AST_SIP_AUTH_TYPE_ARTIFICIAL:
break;
}