mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-13 05:18:55 +00:00
Adds ast_escape_encoded utility to properly handle escaping of quoted field before uri.
This commit backports a feature in trunk affecting initreqprep so that display name won't be encoded improperly. Also includes unit tests for the ast_escape_quoted function. This patch gives 1.8 a much improved outlook in countries which don't use standard ASCII characters. (closes issue ASTERISK-16949) Reported by: Örn Arnarson Review: https://reviewboard.asterisk.org/r/1235/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -11537,7 +11537,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
|
||||
ast_string_field_set(p, fromname, n);
|
||||
|
||||
if (sip_cfg.pedanticsipchecking) {
|
||||
ast_uri_encode(n, tmp_n, sizeof(tmp_n), 0);
|
||||
ast_escape_quoted(n, tmp_n, sizeof(tmp_n));
|
||||
n = tmp_n;
|
||||
ast_uri_encode(l, tmp_l, sizeof(tmp_l), 0);
|
||||
l = tmp_l;
|
||||
|
||||
Reference in New Issue
Block a user