Module: sip-router
Branch: master
Commit: 8c3d167b63096d3b465c53aca92ee18c5255188c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8c3d167…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)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
---
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;