Skip to content
Snippets Groups Projects
Commit 8bc0599b authored by Olle Johansson's avatar Olle Johansson
Browse files

Issue 7208 - Handle ; in userinfo part of URI too

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 404f8db6
No related branches found
No related tags found
No related merge requests found
......@@ -7142,16 +7142,16 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
return -1;
}
from += 4;
from = strsep(&from, ";");
if ((a = strchr(from, '@')))
*a++ = '\0';
else
a = from; /* just a domain */
from = strsep(&from, ";"); /* Remove userinfo options */
a = strsep(&a, ";"); /* Remove URI options */
ast_string_field_set(p, fromdomain, a);
}
 
/* Skip any options and find the domain */
uri = strsep(&uri, ";");
 
/* Get the target domain */
if ((a = strchr(uri, '@'))) {
......@@ -7164,6 +7164,9 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
if (colon)
*colon = '\0';
 
uri = strsep(&uri, ";"); /* Remove userinfo options */
a = strsep(&a, ";"); /* Remove URI options */
ast_string_field_set(p, domain, a);
 
if (!AST_LIST_EMPTY(&domain_list)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment