[sr-dev] git:4.2:8e40cee0: auth: use correct parameter for pv_auth_check checks

Daniel-Constantin Mierla miconda at gmail.com
Wed Jan 28 13:46:33 CET 2015


Module: kamailio
Branch: 4.2
Commit: 8e40cee0473dab5e7796c6479f46f5994280b76a
URL: https://github.com/kamailio/kamailio/commit/8e40cee0473dab5e7796c6479f46f5994280b76a

Author: Martin Mikkelsen <martin.mikkelsen at zisson.no>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-01-28T13:38:39+01:00

auth: use correct parameter for pv_auth_check checks

The pv_auth_check has a flags and a checks parameter but the flags
parameter is used for both. This means that if flags has the 1-bit set
it will enable both HA1-passwords and from/to URI checks and setting the
1-bit in the checks parameter does not do anything.

This fixes the parameters so that the checks parameter is used for the
to/from URI checks.

(cherry picked from commit 2cdda10aa232e545ba79ca71876f0160a68e324b)

---

Modified: modules/auth/auth_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/8e40cee0473dab5e7796c6479f46f5994280b76a.diff
Patch: https://github.com/kamailio/kamailio/commit/8e40cee0473dab5e7796c6479f46f5994280b76a.patch

---

diff --git a/modules/auth/auth_mod.c b/modules/auth/auth_mod.c
index 364e4a6..e08048a 100644
--- a/modules/auth/auth_mod.c
+++ b/modules/auth/auth_mod.c
@@ -772,7 +772,7 @@ static int pv_auth_check(sip_msg_t *msg, char *realm,
 		ret = pv_authenticate(msg, &srealm, &spasswd, vflags, HDR_PROXYAUTH_T,
 					&msg->first_line.u.request.method);
 
-	if(ret==AUTH_OK && (vflags&AUTH_CHECK_ID_F)) {
+	if(ret==AUTH_OK && (vchecks&AUTH_CHECK_ID_F)) {
 		hdr = (msg->proxy_auth==0)?msg->authorization:msg->proxy_auth;
 		srealm = ((auth_body_t*)(hdr->parsed))->digest.username.user;
 




More information about the sr-dev mailing list