mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Change how realms are handled for outbound authentication.
With this change, if no realm is specified in an outbound auth section, then we will simply match the realm that was present in the 401/407 challenge. (closes issue ASTERISK-22471) Reported by George Joseph (closes issue ASTERISK-22386) Reported by Rusty Newton Patches: outbound_auth_realm_v4.patch uploaded by George Joseph (License #6322) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@399059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -395,6 +395,9 @@ static enum ast_sip_check_auth_result digest_check_auth(struct ast_sip_endpoint
|
||||
}
|
||||
|
||||
for (i = 0; i < endpoint->inbound_auths.num; ++i) {
|
||||
if (ast_strlen_zero(auths[i]->realm)) {
|
||||
ast_string_field_set(auths[i], realm, "asterisk");
|
||||
}
|
||||
verify_res[i] = verify(auths[i], rdata, tdata->pool);
|
||||
if (verify_res[i] == AUTH_SUCCESS) {
|
||||
res = AST_SIP_AUTHENTICATION_SUCCESS;
|
||||
|
Reference in New Issue
Block a user