[Home]

Summary:ASTERISK-24808: res_config_odbc: Improper escaping of backslashes occurs with MySQL
Reporter:Javier Acosta (DarkS)Labels:
Date Opened:2015-02-18 12:33:10.000-0600Date Closed:2015-03-10 16:33:11
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_config_odbc
Versions:13.2.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian 7.5 64bit, Asterisk 13.2.0, MySQL 5.5.40 configure with unixODBC and linmyodbcAttachments:( 0) extract_verbose-debug.txt
( 1) res_config_odbc.diff
Description:In "sip reload" we found the next error in logs.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\' ORDER BY name' at line 1 (215)

We found the solution changing in res_config_odbc this lines

*\[Inline patch removed\]*

With this changes in res/res_config_odbc.c all it's working OK now
Comments:By: Matt Jordan (mjordan) 2015-02-18 18:53:37.483-0600

We cannot accept inline patches.

Please attach the patch in unified diff format after signing a license contributor agreement.

By: Matt Jordan (mjordan) 2015-02-18 18:53:59.593-0600

Please do attach a log illustrating the issue as well. It is curious that others have not run into this issue.

By: Javier Acosta (DarkS) 2015-02-25 09:48:42.150-0600

Extract of the log file where the error is printed

By: Javier Acosta (DarkS) 2015-02-25 09:49:19.107-0600

Proposed solution

By: Javier Acosta (DarkS) 2015-02-25 09:54:48.148-0600

Attach all the files that you request, the License Agreement is signed and waiting for validation

By: Rusty Newton (rnewton) 2015-02-26 09:08:14.678-0600

Thanks, after the license agreement is validated and you attach the patch, make sure to press "Send Back" or "Enter Feedback" so we'll see your issue.

By: Javier Acosta (DarkS) 2015-03-03 07:23:35.532-0600

The diff file is attached

By: Rusty Newton (rnewton) 2015-03-03 19:04:24.809-0600

Javier, thanks. Can you re-attach the patch in unified diff format?

You might as well read through the code [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

After you get the patch in unified diff format, you'll want to put it up on Reviewboard as mentioned in the process. Thanks!


By: Javier Acosta (DarkS) 2015-03-04 04:00:09.229-0600

Sorry i make the diff without the -u option, anyway I attach the diff from the current svn version, it's more easy an accurate.

Thanks

By: Matt Jordan (mjordan) 2015-03-10 16:33:24.759-0500

Merged in 11+. Thanks for the contribution!