Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not connect to firebird DB using specific usernames [JDBC635] #665

Closed
firebird-automations opened this issue Dec 4, 2020 · 8 comments

Comments

@firebird-automations
Copy link

Submitted by: Agris Skuja (agris)

Relate to DNET986

We are preparing to migrate from Firebird 2.5 to 3.0.
We encountered strange behaviour when connecting from Java using latest Jaybird 3 (also tried latest 4.x) to Firebird 3.
All test users can connect fine except two users. I installed fresh Firebird 3.0.7 on separate server and initialized new security DB and created those two specific users. Without any luck.
Connections from isql, PHP7, IBExpert work just fine. Connections fail only from Java.

Steps to reproduce:
1. connect to any Firebird 3 database using Srp/Srp256 authorisation.
2. Execute statement:
CREATE USER "DAVIDS" PASSWORD 'aaa123' ACTIVE;
3. Using Java(Jaybird) try to connect to this DB with user "DAVIDS" and password "aaa123"
4. Result:
java.sql.SQLInvalidAuthorizationSpecException: Your user name and password are not defined. Ask your database administrator to set up a Firebird login. [SQLState:28000, ISC error code:335544472]

Firebird 3.0.7 (on Linux x64)
Openjdk 15
Jaybird 4.0.1 and Jaybird 3.0.9

Commits: e72e27d a193146 00018ec

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

I can reproduce the problem, but I have no clue why. Could you also provide the other username that doesn't work for you, maybe it helps to find a pattern.

The workaround seems to be to use a different username.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Problem found, the username DAVIDS produces a SHA-1 hash (used in the client proof) that starts with a 0 byte, in Firebird those zero bytes are stripped out, but not so in the Jaybird code.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: Jaybird 3.0.10 [ 10932 ]

Fix Version: Jaybird 4.0.2 [ 10950 ]

Fix Version: Jaybird 5 [ 10871 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

I don't have a planned date for releasing Jaybird 3.0.10 or Jaybird 4.0.2 yet. If you want, I can build a snapshot for you.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Link: This issue relate to DNET986 [ DNET986 ]

@firebird-automations
Copy link
Author

Commented by: Agris Skuja (agris)

That was amazingly fast!!! :)
Snapshot would be great to have!

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment