[asterisk-commits] kmoore: branch 12 r400863 - /branches/12/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Oct 12 11:49:03 CDT 2013
Author: kmoore
Date: Sat Oct 12 11:49:00 2013
New Revision: 400863
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400863
Log:
Fix realm comparison for outbound auth
When generating the list of authentication credentials to pass to
PJSIP, Asterisk was using the raw pointer of a pj_str_t which is not
always NULL-terminated. This sometimes resulted in incorrect text for
the realm and a failure to match the realm for authentication purposes
which was causing the outbound nominal auth pjsip basic call test to
bounce. This now uses the pj_str_t that contains the realm instead of
generating a new one. Thanks to John Bigelow for helping to narrow this
down.
Modified:
branches/12/res/res_pjsip_outbound_authenticator_digest.c
Modified: branches/12/res/res_pjsip_outbound_authenticator_digest.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_outbound_authenticator_digest.c?view=diff&rev=400863&r1=400862&r2=400863
==============================================================================
--- branches/12/res/res_pjsip_outbound_authenticator_digest.c (original)
+++ branches/12/res/res_pjsip_outbound_authenticator_digest.c Sat Oct 12 11:49:00 2013
@@ -72,7 +72,7 @@
for (i = 0; i < array->num; ++i) {
if (ast_strlen_zero(auths[i]->realm)) {
- pj_cstr(&auth_creds[i].realm, auth_hdr->challenge.common.realm.ptr);
+ auth_creds[i].realm = auth_hdr->challenge.common.realm;
} else {
pj_cstr(&auth_creds[i].realm, auths[i]->realm);
}
More information about the asterisk-commits
mailing list