snowflake-connector-net
snowflake-connector-net copied to clipboard
Unable to connect to snowflake if the password contains ('=' or ';'). It did not work by using escape sequences also
Issue description
Unable to connect to snowflake if the password contains ('=' or ';'). It did not work even using escape sequences
Example code
Error log
Error: Connection string is invalid: Invalid key value pair PASSWORD="'********* SqlState:
Configuration
Driver version:
*Dotnet framework and version:*4.7.2
Server version:
Client OS: Windows 10
it works (should work) if you replace =
with ==
, but there's no solution for ;
:(
@sfc-gh-kterada @SimbaGithub it would be interesting to know how you plan to fix this (if you do). Interestingly enough the spec for the OleDb connectionstring is even included in the source code (https://docs.microsoft.com/en-us/dotnet/api/system.data.oledb.oledbconnection.connectionstring), but the implementation thoroughly ignores it.
The problem that I see is that whatever you do now is breaking change. E.g. schema names must be quoted in the connection string - ;SCHEMA="Foo"
currently will use the quoted schema name, i.e. "Foo"
; if you reinterpret the connection string according to the spec, then the value passed will be Foo
which is the same as FOO
- i.e. a very different schema name. The correct way (according to spec) to write the connection string would be ;SCHEMA='"Foo"'
but this doesn't currently work.
i'm looking into this
the fix on Oct 2022 release