[Asterisk-code-review] res_pjsip: Replace invalid UTF-8 sequences in callerid name (asterisk[18])
George Joseph
asteriskteam at digium.com
Fri Feb 24 17:00:24 CST 2023
Attention is currently required from: George Joseph.
Hello Sean Bright, Friendly Automation, Benjamin Keith Ford,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/c/asterisk/+/19898
to look at the new patch set (#3).
Change subject: res_pjsip: Replace invalid UTF-8 sequences in callerid name
......................................................................
res_pjsip: Replace invalid UTF-8 sequences in callerid name
* Added a new function ast_utf8_replace_invalid_chars() to
utf8.c that copies a string replacing any invalid UTF-8
sequences with the Unicode specified U+FFFD replacement
character. For example: "abc\xffdef" becomes "abc\uFFFDdef".
Any UTF-8 compliant implementation will show that character
as a � character.
* Updated res_pjsip:set_id_from_hdr() to use
ast_utf8_replace_invalid_chars and print a warning if any
invalid sequences were found during the copy.
* Updated stasis_channels:ast_channel_publish_varset to use
ast_utf8_replace_invalid_chars and print a warning if any
invalid sequences were found during the copy.
ASTERISK-27830
Change-Id: I4ffbdb19c80bf0efc675d40078a3ca4f85c567d8
---
M include/asterisk/json.h
M include/asterisk/utf8.h
M main/json.c
M main/stasis_channels.c
M main/utf8.c
M res/res_pjsip.c
M tests/test_json.c
7 files changed, 665 insertions(+), 126 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/98/19898/3
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/19898
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I4ffbdb19c80bf0efc675d40078a3ca4f85c567d8
Gerrit-Change-Number: 19898
Gerrit-PatchSet: 3
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230224/bf4df5eb/attachment-0001.html>
More information about the asterisk-code-review
mailing list