]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
allow unescaped # in username portion of uri even though it is agains rfc 2396, to...
authorMichael Jerris <mike@jerris.com>
Tue, 2 Jan 2007 23:44:44 +0000 (23:44 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 2 Jan 2007 23:44:44 +0000 (23:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3898 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/libsofia-sip-ua/url/url.c

index 9b009d71d59e434a3f894d721c86b21dfa2b22d4..b0ec75587133dcc6b2679c673d32c7e246d18902 100644 (file)
@@ -592,9 +592,14 @@ int _url_d(url_t *url, char *s)
 
   if (url->url_type == url_sip || url->url_type == url_sips) {
     /* SIP URL may have /; in user part */
-    n = strcspn(s, "@#");      /* Opaque part */
-    if (s[n] != '@')
-      n = 0;
+    n = strcspn(s, "@");       /* Opaque part */
+       if (n == strlen(s)) {
+               if ((strchr(s, '#')))
+                       n = 0;
+       } else {
+               if (strchr(s + n, '#'))
+                       n = 0;
+       }
     n += strcspn(s + n, "/;?#");
   }
   else if (url->url_type == url_wv) {