[sr-dev] git:4.2: core: keep the password only if the user part is set

Daniel-Constantin Mierla miconda at gmail.com
Sat Dec 6 00:25:53 CET 2014


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
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)

---

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

diff --git a/action.c b/action.c
index 2e58034..43cac50 100644
--- a/action.c
+++ b/action.c
@@ -932,8 +932,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;




More information about the sr-dev mailing list