Skip to content

Commit

Permalink
dispatcher: log messages for hashing auth username
Browse files Browse the repository at this point in the history
(cherry picked from commit e9cfb2b)
  • Loading branch information
miconda committed Aug 30, 2017
1 parent 301ee8b commit 2232c34
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/modules/dispatcher/dispatch.c
Expand Up @@ -1212,12 +1212,16 @@ int ds_hash_authusername(struct sip_msg *msg, unsigned int *hash)
LM_ERR("bad parameters\n");
return -1;
}
*hash = 0;
if(parse_headers(msg, HDR_PROXYAUTH_F, 0) == -1) {
LM_ERR("error parsing headers!\n");
return -1;
}
if(msg->proxy_auth && !msg->proxy_auth->parsed)
parse_credentials(msg->proxy_auth);
if(msg->proxy_auth && !msg->proxy_auth->parsed) {
if(parse_credentials(msg->proxy_auth)!=0) {
LM_DBG("no parsing for proxy-auth header\n");
}
}
if(msg->proxy_auth && msg->proxy_auth->parsed) {
h = msg->proxy_auth;
}
Expand All @@ -1226,8 +1230,11 @@ int ds_hash_authusername(struct sip_msg *msg, unsigned int *hash)
LM_ERR("error parsing headers!\n");
return -1;
}
if(msg->authorization && !msg->authorization->parsed)
parse_credentials(msg->authorization);
if(msg->authorization && !msg->authorization->parsed) {
if(parse_credentials(msg->authorization)!=0) {
LM_DBG("no parsing for auth header\n");
}
}
if(msg->authorization && msg->authorization->parsed) {
h = msg->authorization;
}
Expand Down

0 comments on commit 2232c34

Please sign in to comment.