Explorar el Código

auth: fix unparsed from header usage

The from parsing check did not parse also the from body.
Andrei Pelinescu-Onciul hace 15 años
padre
commit
6b2ea25f67
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      modules/auth/nonce.c

+ 1 - 1
modules/auth/nonce.c

@@ -143,7 +143,7 @@ inline static int calc_bin_nonce_md5(union bin_nonce* b_nonce, int cfg,
 			MD5Update(&ctx, msg->callid->body.s, msg->callid->body.len);
 		}
 		if ((cfg & AUTH_CHECK_FROMTAG) &&
-			!(parse_headers(msg, HDR_FROM_F, 0) < 0 || msg->from == 0)) {
+			!(parse_from_header(msg) < 0 )) {
 			MD5Update(&ctx, get_from(msg)->tag_value.s, 
 					  get_from(msg)->tag_value.len);
 		}