Module: kamailio
Branch: 4.2
Commit: 8e40cee0473dab5e7796c6479f46f5994280b76a
URL:
https://github.com/kamailio/kamailio/commit/8e40cee0473dab5e7796c6479f46f59…
Author: Martin Mikkelsen <martin.mikkelsen(a)zisson.no>
Committer: Daniel-Constantin Mierla <miconda(a)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/8e40cee0473dab5e7796c6479f46f59…
Patch:
https://github.com/kamailio/kamailio/commit/8e40cee0473dab5e7796c6479f46f59…
---
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;