-
Notifications
You must be signed in to change notification settings - Fork 37
Description
ODBC driver expects the password in a connection string to be URL-encoded but I don't find any reason to do that.
This requirement could lead to connection issues when client applications (like Microsoft PowerBI) request the credentials from the user and create a connection string in the following way:
- "DSN=myDSN;UID=myUser;PWD=myPass;"
If the password contains characters that need to be encoded and the application does not perform any of the following changes the connection will fail:
- Encode password as the driver requires.
- Send the password in the connection string between brackets.
Currently, to avoid this issue there are two alternatives:
- Make the final user to encode their password.
- Change the client application to encode the password properly.
The first option does not seem feasible many users are using the application. Also, the second option cannot be achieved by generic ODBC clients (for example, Microsoft PowerBI with the generic ODBC connector), as the client could not know this requirement.
I would suggest removing the encode and decode methods included in dlg_specific.c file.
Notes:
- The option conn_settings was required to be URL-Encoded in the past, but this requirement was removed in this commit.
- Why? and Why not with the password?
- This problem does not happen if the credentials stored in the DSN are used.
- Microsoft ODBC documentation of SQLDriverConnect function
- If this requirement is removed, the client could use the ODBC specification to determine if the password must be sent between brackets.
- Reviewed useful information in this message from the mailing list.
Please, feel free to ask anything which is not clear with my description.