[asterisk-commits] file: trunk r38421 - in /trunk: ./
channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Jul 28 11:53:44 MST 2006
Author: file
Date: Fri Jul 28 13:53:43 2006
New Revision: 38421
URL: http://svn.digium.com/view/asterisk?rev=38421&view=rev
Log:
Merged revisions 38420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r38420 | file | 2006-07-28 14:49:00 -0400 (Fri, 28 Jul 2006) | 2 lines
Make a copy of the request URI in check_user_full instead of modifying the one on the structure, and also strip params properly from the user portion of the SIP URI so as to preserve the domain (issue #7552 reported by dan42)
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=38421&r1=38420&r2=38421&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jul 28 13:53:43 2006
@@ -8535,9 +8535,10 @@
int debug=sip_debug_test_addr(sin);
struct ast_variable *tmpvar = NULL, *v = NULL;
int usenatroute;
+ char *uri2 = ast_strdupa(uri);
/* Terminate URI */
- t = uri;
+ t = uri2;
while (*t && *t > 32 && *t != ';')
t++;
*t = '\0';
@@ -8557,7 +8558,7 @@
of = get_in_brackets(from);
if (ast_strlen_zero(p->exten)) {
- t = uri;
+ t = uri2;
if (!strncmp(t, "sip:", 4))
t+= 4;
ast_string_field_set(p, exten, t);
@@ -8630,7 +8631,7 @@
ast_log(LOG_DEBUG, "Setting NAT on UDPTL to %s\n", usenatroute ? "On" : "Off");
ast_udptl_setnat(p->udptl, usenatroute);
}
- if (!(res = check_auth(p, req, user->name, user->secret, user->md5secret, sipmethod, uri, reliable, ast_test_flag(req, SIP_PKT_IGNORE)))) {
+ if (!(res = check_auth(p, req, user->name, user->secret, user->md5secret, sipmethod, uri2, reliable, ast_test_flag(req, SIP_PKT_IGNORE)))) {
sip_cancel_destroy(p);
ast_copy_flags(&p->flags[0], &user->flags[0], SIP_FLAGS_TO_COPY);
ast_copy_flags(&p->flags[1], &user->flags[1], SIP_PAGE2_FLAGS_TO_COPY);
@@ -8757,7 +8758,7 @@
ast_string_field_free(p, peersecret);
ast_string_field_free(p, peermd5secret);
}
- if (!(res = check_auth(p, req, peer->name, p->peersecret, p->peermd5secret, sipmethod, uri, reliable, ast_test_flag(req, SIP_PKT_IGNORE)))) {
+ if (!(res = check_auth(p, req, peer->name, p->peersecret, p->peermd5secret, sipmethod, uri2, reliable, ast_test_flag(req, SIP_PKT_IGNORE)))) {
ast_copy_flags(&p->flags[0], &peer->flags[0], SIP_FLAGS_TO_COPY);
ast_copy_flags(&p->flags[1], &peer->flags[1], SIP_PAGE2_FLAGS_TO_COPY);
/* If we have a call limit, set flag */
More information about the asterisk-commits
mailing list