mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Fix erroneous behavior when sending auth rejection to artificial endpoint.
We were not including an authentication challenge when sending a 401 response to unmatched endpoints. This was due to the conversion to use a vector for authentication section names on an endpoint. The vector for artificial endpoints was empty, resulting in the challenge being sent back containing no challenges. This is worked around by placing a bogus value in the artificial endpoint's auth vector. This value is never looked up by anything, since they instead will directly call ast_sip_get_artificial_auth(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -228,6 +228,11 @@ static int create_artificial_endpoint(void)
|
||||
}
|
||||
|
||||
AST_VECTOR_INIT(&artificial_endpoint->inbound_auths, 1);
|
||||
/* Pushing a bogus value into the vector will ensure that
|
||||
* the proper size of the vector is returned. This value is
|
||||
* not actually used anywhere
|
||||
*/
|
||||
AST_VECTOR_APPEND(&artificial_endpoint->inbound_auths, "artificial-auth");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user