Bug #16659 Can't use double quotation marks(") as password access server by Connector/NET
Submitted: 20 Jan 2006 2:42 Modified: 28 Feb 2006 2:48
Reporter: 继东 Liu Email Updates:
Status: Closed Impact on me:
Category:Connector / NET Severity:S3 (Non-critical)
Version:1.0.7 OS:Windows (Windows)
Assigned to: Reggie Burnett CPU Architecture:Any

[20 Jan 2006 2:42] 继东 Liu
I develope a program that access MySQL server by connector/NET. The password of root is a double quotation marks("), I can login server from MySQL Administrator program, but can't access server from my program. I think the connector/NET parse the double quotation marks as list separator trimed. I have modified the connector/NET and now it can run correctly. That I reporting it is for getting a correct version in next version connector/NET. Thank you.

How to repeat:
1. Set the password of a user is double quotation marks or space or single quotes.
2. Run the sample program named TableEditor that is with connector/NET.
3. Input the correct data in server and User ID.
4. Input the password in password.
5. Click the connect button.
6. A Error occured and a message box shown.

Suggested fix:
// Added by Liu Jidong at 01/19/2006
				if ((parts[1][0] == '"' && parts[1][parts[1].Length - 1] == '"') ||
					(parts[1][0] == '\'' && parts[1][parts[1].Length - 1] == '\''))
					parts[1] = parts[1].Substring(1, parts[1].Length - 2);
					parts[1] = parts[1];
//				parts[1] = parts[1].Trim('\'', '"');
[20 Jan 2006 9:09] Aleksey Kishkin
thank you for patch and bug report.
[23 Feb 2006 20:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[23 Feb 2006 20:13] Reggie Burnett
Fixed in 1.0.8

I applied your patch (thank you).  I included a test case that works fine for a single quote or double quote mark.  I think the server might be interpreting double quotes so I have not seen that work yet.

Marking this closed.  Please let me know if this is insufficient.
[28 Feb 2006 2:48] Paul DuBois
Noted in 1.0.8 changelog.

The connection string parser did not allow single or double
quotes in the password. (Bug #16659)