Module: sip-router
Branch: 4.1
Commit: bb9c3af9be386f3933713ef180c293ac9162e3e7
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bb9c3af9be386f3933713ef180c293ac9162e3e7

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Fri Dec  5 18:17:39 2014 +0100

core: keep the password only if the user part is set

- a report by Timo Klecker

(cherry picked from commit 8c3d167b63096d3b465c53aca92ee18c5255188c)
(cherry picked from commit f03a1769c55b4992613e153bd8d7bd012fc67525)

---

 action.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/action.c b/action.c
index 5fa50ee..5c078ce 100644
--- a/action.c
+++ b/action.c
@@ -943,8 +943,8 @@ int do_action(struct run_act_ctx* h, struct action* a, 
struct sip_msg* msg)
 
                                if (a->type==SET_USERPASS_T) tmp=0;
                                else tmp=uri.passwd.s;
-                               /* passwd */
-                               if (tmp){
+                               /* passwd - keep it only if user is set */
+                               if (user && tmp){
                                        len=uri.passwd.len; if(crt+len+1>end) 
goto error_uri;
                                        *crt=':'; crt++;
                                        memcpy(crt,tmp,len);crt+=len;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to