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

Liviu Chircu noreply at github.com
Tue Jan 18 15:18:42 UTC 2022

  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 62f6cf88885293c47bab331dabbe03e882073ed6
  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 name/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!

(cherry picked from commit 2b6c3239da501ec4d4627c48d58bd723785566ba)
(cherry picked from commit 9c53945bdde63060aa476459cb6ec579fb65d43e)

More information about the Devel mailing list