]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: Don't require a password when doing userpass authentication.
authorSean Bright <sean@malleable.com>
Thu, 18 Sep 2014 19:29:30 +0000 (19:29 +0000)
committerSean Bright <sean@malleable.com>
Thu, 18 Sep 2014 19:29:30 +0000 (19:29 +0000)
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@423481 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip/config_auth.c

index e105e7492a7ddbee3eedd6800cdb993f5a15e089..30af0ef03e50fc73fa2cbc7368a8f4aab657b7b3 100644 (file)
@@ -94,13 +94,6 @@ static int auth_apply(const struct ast_sorcery *sorcery, void *obj)
        }
 
        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 "
@@ -113,6 +106,7 @@ static int auth_apply(const struct ast_sorcery *sorcery, void *obj)
                        res = -1;
                }
                break;
+       case AST_SIP_AUTH_TYPE_USER_PASS:
        case AST_SIP_AUTH_TYPE_ARTIFICIAL:
                break;
        }