[asterisk-commits] kmoore: trunk r400864 - in /trunk: ./ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Oct 12 11:53:07 CDT 2013
Author: kmoore
Date: Sat Oct 12 11:53:06 2013
New Revision: 400864
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400864
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.
........
Merged revisions 400863 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/res/res_pjsip_outbound_authenticator_digest.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/res/res_pjsip_outbound_authenticator_digest.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_outbound_authenticator_digest.c?view=diff&rev=400864&r1=400863&r2=400864
==============================================================================
--- trunk/res/res_pjsip_outbound_authenticator_digest.c (original)
+++ trunk/res/res_pjsip_outbound_authenticator_digest.c Sat Oct 12 11:53:06 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