Password using specific chars
Hi. Have a problem connection to a database using a password that has special Norwegian chars on it (æøå). Although I'm able to login using, for instance, DBeaver, I'm not able to connect using this user. Definitely is a charset problem, since if I change the password to something "normal", the thing works correctly. I tried to make some encoding work on the string, with nor success. Any thoughts?
PS: This is how I'm creating the connection string. I tried as well as creating it manually, with the same results.
FbConnectionStringBuilder cs = new FbConnectionStringBuilder(); if (this.ServerName == string.Empty) { this.ServerName = "LOCALHOST"; } cs.Database = this.DatabaseFile; cs.DataSource = this.ServerName; cs.Port = this.PortNumber; cs.UserID = this.UserName; cs.Password = pass; cs.Charset = "ISO8859_1"; cs.Role = "HKADMINISTRATOR"; cs.Add("Authentication", "Legacy_Auth"); cs.Add("ExtendedMetadata", false);
Which Firebird version are you using? Also, I'm not clear about the situation of DBeaver. Are you able to login in DBeaver with the user and password, or not? Also, the code you show is C# code, not Java code, so is your problem with Java or with C#?
Sorry the misunderstanding. The problem is in c#, using FirebirdSql.Data.FirebirdClient version 10.3.2 I'm able to login using DBeaver, and from a Delphi made software. Debugged Delphi code and no special remarks on password. Just used as plain text. The database is Firebird 2.5.9. Can't upgrade, since this is to extract some reports from legacy software.
I'm transferring your question to https://github.com/FirebirdSQL/NETProvider, as that is where it belongs.
The problem has likely to do with which character set is used to encode the password into the database parameter buffer. I guess UTF-8 is used, and that will not work for the legacy authentication used in Firebird 2.5 and older (and the Legacy_Auth plugin of Firebird 3.0 and higher).
Funnily enough, this did make me uncover an authentication error against Firebird 3.0 and higher with Legacy_Auth in Jaybird.
That's fantastic that made you improve your work. Sorry for not putting this in the correct place. I'll be following the thing there. Thanks again.
Hi. Any comments on this? Progress? Thanks.