Skip to content

Commit

Permalink
dialog: parse tm callback reply in early phase to detect broken format
Browse files Browse the repository at this point in the history
(cherry picked from commit 6b9837c)
(cherry picked from commit c2995f7)
(cherry picked from commit a9fb58a)
  • Loading branch information
miconda committed Apr 4, 2019
1 parent 56696a6 commit a32b6da
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/dialog/dlg_handlers.c
Expand Up @@ -435,6 +435,13 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param)
if(dlg==0)
return;

if (rpl != FAKED_REPLY) {
if(parse_headers(rpl, HDR_EOH_F, 0) < 0) {
LM_ERR("failed to parse the reply headers\n");
goto done_early;
}
}

unref = 0;
if (type & (TMCB_RESPONSE_IN|TMCB_ON_FAILURE)) {
/* Set the dialog context so it is available in onreply_route and failure_route*/
Expand Down

0 comments on commit a32b6da

Please sign in to comment.