I think you should probably post this to the Firebird .net provider mailing list. The problem seems to be that case-sensitive user names need to be correctly supported by the client.

And in the case of Firebird.net provider (and Jaybird for that matter), for example the SRP implementation will always upper case the username, which makes the SRP proof for a case sensitive user name fail.

The thing that needs to be addressed here that - in my opinion- this is a problem that is caused by lack of proper low-level documentation.

Mark

On 16-9-2018 11:54, Kjell Rilbe wrote:
Hi,

In FB 3.0.3 it's possible to create a user with mixed case like this in isql:
create user "MixedCaseName" password '***';

After that, I create a database in isql, referencing the already defined alias 'MyDB': create database 'MyDB' user "MixedCaseName" password '***' page_size 4096 set names 'UTF8' default character set UTF8 collation UNICODE;

Then I try to connect using .NET FirebirdClient 6.3.0 with this connections string: Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User='"MixedCaseName"';Password=***

This fails with an error saying "Your user name and password are not defined. Ask your database administrator to set up a Firebird login.".

I checked that the connection string is (correctly) parsed so that the user name that's actually submitted by the .NET FirebirdClient is "MixedCaseName" with double quotes included.

I've also tried these connections strings, but none of them work:
Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User="MixedCaseName";Password=*** Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User='MixedCaseName';Password=*** Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User=MixedCaseName;Password=*** In all these cases, the user name is parsed so that it is sent to the server qithout quotes, and the same error occurs.

Finally, switching the single and double quotes:
Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User="'MixedCaseName'";Password=*** The password is parsed so that it is sent with the single quotes 'MixedCaseName' to the server. Same error.

It seem to me that the .NET FirebirClient does a correct job parsing the connection string, but no matter how the user name is sent to the server, the login fails.

Trying the exact same thing with a uppercase user name works when the username is specified so that it is sent to the server without quotes, but fails with the same error if it's sent with double or single quotes. I.e. these work: Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User="UPPERNAME";Password=*** Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User='UPPERNAME';Password=*** Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User=UPPERNAME;Password=***
But these fail:
Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User="'UPPERNAME'";Password=*** Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User='"UPPERNAME"';Password=***

I also note that in this case, it doesn't matter what case is used for the user name. I.e. These also work: Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User="Uppername";Password=*** Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User='uPpErNaMe';Password=*** Server=xxx.xxx.xxx.xxx;port=3050;Database=MyDB;Charset=UTF8;User=upperNAME;Password=***

As far as I understand this:
https://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-login-international.html Firebird 3 is supposed to fully support mixed-case user names. Seems not to work in this case, or am I missing something?

Neither user name nor password uses anything except a-z, A-Z, 0-9 and & in any of these tests, so there should be no problems caused by OEM/ANSI/UTF8 code page mixups.

Mvh,
Kjell



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel



--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to