Bug #106789 MySQL ODBC Connector hangs in SQLDriverConnector if password contains '}'
Submitted: 21 Mar 2022 17:18 Modified: 22 Mar 2022 11:53
Reporter: Arthur Adolfo Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:8.0.28 OS:SUSE
Assigned to: CPU Architecture:x86

[21 Mar 2022 17:18] Arthur Adolfo
Description:
I am opening this bug because the other I created (https://bugs.mysql.com/bug.php?id=106631) was closed as duplicate and the reply said that ODBC Driver Manager doesn't support curly braces in password, which is false.

------
Previous bug description:

The MySQL ODBC Connector is hanging when PWD parameter from connection string is escaped with {} and the PWD value contains }. 

For general ODBC drivers, the } character should be escaped by doubling it: ...;PWD={some}}password};...

It seems that MySQL ODBC Connector is not able to handle the parsing and it is hanging.

If the PWD is not escaped with {}, it works well. eg. ...;PWD=some}password;...

The error is happening with the latest community driver and is reproducible using isql -k command.

How to repeat:
Run:

isql -k "DRIVER={/driver/path/libmyodbc8a.so};SERVER={host.docker.internal};PORT=3306;UID={root};PWD={some}}password};DATABASE={mysql};" -v

The isql command will hang. This other command will hang as well (not doubling } in the password):

Run isql -k "DRIVER={/driver/path/libmyodbc8a.so};SERVER={host.docker.internal};PORT=3306;UID={root};PWD={some}password};DATABASE={mysql};" -v

Suggested fix:
Handle correctly the parsing of double } when PWD value is escaped with {}.
[22 Mar 2022 11:53] MySQL Verification Team
Hello Arthur Adolfo,

Thank you for the report and feedback.
Let us close this as a duplicate of Bug #106631 and would open Bug #106631.

regards,
Umesh