Skip to content

Commit

Permalink
check CSeq method matches that of the reqeust line
Browse files Browse the repository at this point in the history
  • Loading branch information
Weiqi Wang committed Aug 21, 2021
1 parent 98b122c commit ae1a19a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sip/transp.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ static void sip_recv(struct sip *sip, const struct sip_msg *msg,
}
}

/* check consistency between CSeq method and that of request line */
if (msg->req && pl_casecmp(&(msg->cseq.met), &(msg->met))){
(void)sip_reply(sip, msg, 400, "Bad Request");
return;
}

while (le) {
struct sip_lsnr *lsnr = le->data;

Expand Down

0 comments on commit ae1a19a

Please sign in to comment.