New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
escape transformation chokes on UTF characters #549
Comments
I think escape.user is trying to follow the SIP grammar/constraints for username, or at list it should. For db operations, maybe escape.common or sql transformation are more suitable. At the end, the code can be patches, probably it's about lifting some restrictions there. |
You are right. The pipe character is a problem not for sql operations as such but for the ACC mediator that parses src/dst_leg. Therefore I had to use stricter escape.user instead of escape.common or sql transformations. Maybe a new transformation can be created or, as you said, some restrictions lifted in escape.user. Going to check it with Victor. |
You can also use subst transformation to replace what characters you want in a variable. |
Closing this one, either a new transformation needs to be added or use a combination of existing ones. |
Version 4.3.4 fails to escape the string that contains Unicode characters:
$var(test_escaped) = $ (var(test){s.escape.user});
$var(test) = "Foobar s.à.r.l.";
Mar 23 16:00:28 sp1 (local7.err) proxy[27853]: ERROR: [strcommon.c:241]: escape_user(): invalid escaped character <4294967235>
Mar 23 16:00:28 sp1 (local7.err) proxy[27853]: ERROR: [lvalue.c:345]: lval_pvar_assign(): non existing right pvar
Mar 23 16:00:28 sp1 (local7.err) proxy[27853]: ERROR: [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.
The text was updated successfully, but these errors were encountered: