[OpenSIPS-Devel] [OpenSIPS/opensips] 2b6c32: dialog: Add quotation mark escaping in get_dialogs...

Liviu Chircu noreply at github.com
Tue Jan 18 14:56:20 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 2b6c3239da501ec4d4627c48d58bd723785566ba
      https://github.com/OpenSIPS/opensips/commit/2b6c3239da501ec4d4627c48d58bd723785566ba
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2022-01-18 (Tue, 18 Jan 2022)

  Changed paths:
    M modules/dialog/dialog.c

  Log Message:
  -----------
  dialog: Add quotation mark escaping in get_dialogs_by_val()

In case a dialog value contained the '"' character (ASCII 34), such as
values stored by pua_dialoginfo, the resulting JSON would be invalid.

Also optimize the function code a bit, by merging lots of
DEC_AND_CHECK_LEN() calls together wherever possible.

Credits to Giovanni Maruzzelli for a detailed reporting on this issue!





More information about the Devel mailing list