If you quote backslash, you corrupt data for databases that follow the SQL standard and don’t use backslash. <snarky MySQL comment elided>

This is really more a problem with using a “quote” function instead of proper parameterized queries. I don’t believe it’s possible to accommodate both escaping methods with the same function.

 

If parameterized queries aren’t possible to do in FS (or too much work), there should probably be some switch that controls backslash handling.

 

-Michael

 

 

From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of Seven Du
Sent: Wednesday, February 08, 2012 6:55 AM
To: freeswitch-dev
Subject: [Freeswitch-dev] backslash in call-id

 

Hi,

 

I have a sip client which generates call-id with backslashes which causing error:

 

ERR: [insert into sip_registrations ............. values ('<c)X/Iz\'

 

 

I looked into

 

http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__call__id.html

 

looks like backslash '\' is valid in call-id

 

so is it ok to to let switch_mprintf %q also quote backslash ?

 

should I report a jira?

 

Thanks.

 

-- 

About: http://about.me/dujinfang

Blog: http://www.dujinfang.com

Proj:  http://www.freeswitch.org.cn

 

Sent with Sparrow