[sr-dev] [kamailio] escape transformation chokes on UTF characters (#549)

apogrebennyk notifications at github.com
Wed Mar 23 17:19:53 CET 2016


Version 4.3.4 fails to escape the string that contains Unicode characters:
$var(test) = "Foobar s.à.r.l.";
$var(test_escaped) = $(var(test){s.escape.user});

Mar 23 16:00:28 sp1 (local7.err) proxy[27853]: ERROR: <core> [strcommon.c:241]: escape_user(): invalid escaped character <4294967235>
Mar 23 16:00:28 sp1 (local7.err) proxy[27853]: ERROR: <core> [lvalue.c:345]: lval_pvar_assign(): non existing right pvar
Mar 23 16:00:28 sp1 (local7.err) proxy[27853]: ERROR: <core> [lvalue.c:405]: lval_assign(): assignment failed at pos: (701,35-701,97)

is there a way to ignore those characters or is it something we have to live with?

Some background: we are storing some user-defined data as custom attributes in acc src_leg/dst_leg. As you know the fields in src/dst_leg are pipe-separated. In order to prevent the user from hijacking the attributes we have devided to escape the user-provided fields. This is when we realized that this is limited to latin1 encoding. In theory we can escape it using lua just wanted to avoid the overhead of calling the interpreter too often.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/549
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160323/b453a348/attachment.html>


More information about the sr-dev mailing list