Actions
Bug #2063
openDatabase will always try to create a new user on log in
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/01/2026
Due date:
% Done:
0%
Estimated time:
Description
Description¶
A freeciv-server started with authentification configured, see `auth.conf` and the corresponding pre-filled password database: `user_auth.sqlite` that was created during a previous run with `--Newusers` will always try to create a new user and not allow logins already present.
Reproduction¶
- Start freeciv-server version 3.2.4
freeciv-server -m --auth --Database auth.conf --Newusers
- Connect with a client
I used the gtk client (gtk 3.22).
Log in with `user` and password `password`, confirm the password.
Then disconnect again. - Connect with the client (again)
(again, gtk client)
Use the same credentials and observe the failure in the server logs:1: lua error: /etc/freeciv/database.lua:281: LuaSQL: UNIQUE constraint failed: fcdb_auth.name stack traceback: : in function 'assert' /etc/freeciv/database.lua:281: in function 'user_save' 1: Error writing to database for: user
Comments¶
It seems to me that user recognition is broken, because when the server is run with registrations closed, it won't even let me enter any password for the pre-registered user and reject the connection.
Versions¶
I can reproduce this on 3.2.4 no flakiness.
Version 3.2.2 works as expected.
Files
Actions