FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.26k stars 217 forks source link

Problem with passwords when creating a batch of users [CORE6115] #6364

Open firebird-automations opened 5 years ago

firebird-automations commented 5 years ago

Submitted by: John Franck (bozzy)

Attachments: users_long.sql users_short.sql BUG FireBird User Login Tester.zip

I've generated a script for creating a batch (\~3000) of users on my Firebird installation. Some of them have had difficulties logging in (Your user name and password are not defined).

After investigation it appears like their passwords were not defined. This conclusion is because creating the same user again results in "violation of PRIMARY or UNIQUE KEY constraint "INTEG_5" on table "PLG$SRP" " (so the user is there) and an "alter user USERNAME password 'mypassword' " solves the login problem.

The script is as simple as: create user U0001 password 'mypass0123'; create user U0002 password 'mypass0123'; create user U0003 password 'mypass0123'; create user U0004 password 'mypass0123'; create user U0005 password 'mypass0123'; create user U0006 password 'mypass0123'; create user U0007 password 'mypass0123'; create user U0008 password 'mypass0123'; create user U0009 password 'mypass0123'; create user U0010 password 'mypass0123'; (this for a lot of users)

Statistically more or less every hundred users created there's one with this kind of problem. It seems (but I've not done extensive testing) that with longer usernames there's more chance that the problem arises (more frequent users with login problems).

firebird-automations commented 5 years ago

Commented by: John Franck (bozzy)

These are two scripts I've used to test this issue, one with short usernames and another with longer ones. The longer ones resulted in more users not being able to login until password is set again with "alter user ... password ...".

firebird-automations commented 5 years ago
Modified by: John Franck (bozzy) Attachment: users\_long\.sql \[ 13365 \] Attachment: users\_short\.sql \[ 13366 \]
firebird-automations commented 5 years ago
Modified by: John Franck (bozzy) security: Developers \[ 10012 \] =\>
firebird-automations commented 5 years ago

Commented by: @dyemanov

Looks like a duplicate for CORE6038.

firebird-automations commented 5 years ago

Commented by: John Franck (bozzy)

I've attached a Delphi program to test the login capability of a list of users. Set the server host name or IP, database name and password (for this purpose it must be the same for all users), copy all usernames in the first memo box and click "Test users", the ones with problems will be copied in the second memo box.

firebird-automations commented 5 years ago
Modified by: John Franck (bozzy) Attachment: BUG FireBird User Login Tester\.zip \[ 13367 \]
firebird-automations commented 5 years ago

Commented by: John Franck (bozzy)

Oh, yes maybe it's the same as CORE6038, didn't find this issue when searching for my problem. So it should be fixed in 3.0.5, good news.