Force Password Change User field default not upgraded.

So, we have an application that was upgraded to v11.11 from a much older version, like 10.8 I think. We used the up2.php script I believe. Now when some users login for either the first time ever or the first time in awhile they get a General Error 1364 (see pasted image). Inspection of the `dadabik_users` table revealed that there was no default set for the `force_password_change_user` field. We manually set the field default to 'no' and saved the table. Now the error is gone. I would suspect this was something the upgrade script should do automatically and was missed. Since it is a schema change, maybe not. We do not use those user account features since we authenticate strictly via LDAP and password changes are enforced at the domain controller level.. Thought you should know so you can check the upgrade code.
1697664480121.png
Details:
You are using DaDaBIK version 11.11-Elba platinum, installed on 10-06-2023
You are running the latest release of DaDaBIK
System info
PHP Version: 7.4.6
mysql version: 5.5.5-10.5.13-MariaDB
Web server: Apache
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
 

eugenio

Administrator
Staff member
Hello and thanks for the report.
the field has been added with version 11.4 and the upgrade script also adds a default value "no", this is the code:

ALTER TABLE youruserstable ADD force_password_change_user VARCHAR(3) NOT NULL DEFAULT 'no'

it's very strange you didn't have a default value but you had the field. Do you have any other info you think it's useful to understand what happened?

Best,
 
Thanks for posting the query for properly updating the field. It is possible that we moved an application across servers and duplicated or synchronized the underlying data and that may have played a roll in what happened here.
 
Top