Module: sip-router
Branch: 4.2
Commit: f03a1769c55b4992613e153bd8d7bd012fc67525
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f03a176…
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
(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;
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#499 - add support to auth_db to validate source IP address
User who did this - Emmanuel Schmidbauer (eschmidbauer)
----------
I do agree. I think this illustrates a problem with Kamailio though, the lack of documentation. Especially of common practices and techniques.
I just explored the wiki and I couldn't even find a place to doc this scenario.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=499#comment1731
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#499 - add support to auth_db to validate source IP address
User who did this - Olle Johansson (oej)
----------
So do we agree we don't need to change anything in auth_db?
I think adding something in the code will mean that users are less interested in going exploring all possible options we have to do this and think this is the only way.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=499#comment1730
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
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;
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#499 - add support to auth_db to validate source IP address
User who did this - Emmanuel Schmidbauer (eschmidbauer)
----------
After a bit of discussion on IRC, found this to be the best solution using ipops
modparam("auth_db", "load_credentials", "$var(ip)=ip_address")
if (!proxy_authenticate("$fd", "user_extension")) {
proxy_challenge("$fd", "1");
exit;
}
if (ip_type("$var(ip)") && !is_in_subnet("$si", "$var(ip)")) {
sl_send_reply( "403", "IP forbidden" );
exit;
}
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=499#comment1729
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#499 - add support to auth_db to validate source IP address
User who did this - Emmanuel Schmidbauer (eschmidbauer)
----------
Thanks @Alex.
Your example worked:
modparam("auth_db", "load_credentials", "$var(ip)=ip_address")
if (!proxy_authenticate("$fd", "user_extension") || !is_in_subnet("$si", "$var(ip)")) {
proxy_challenge("$fd", "1");
exit;
}
Please disregard this patch, I would like to doc this example on auth_db if possible.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=499#comment1728
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.