-
Notifications
You must be signed in to change notification settings - Fork 108
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
Update 8.0.0.sql to fix admin lockout bug #584
Conversation
mrkalchemy
commented
May 25, 2023
•
edited
edited
Questions | Answers |
---|---|
Description? | Added SQL UPDATE statements to upgrade process to fix problem cause by missing default values for new date columns in session tables. If MariaDB or MySQL is configured to allow zero dates admin users will be locked out of the backoffice interface unless they manually delete cookies. |
Type? | bug fix |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | Fixes #PrestaShop/PrestaShop#32709 |
Sponsor company | - |
How to test? | Upgrading a 1.7.8.9 install to 8.0.0+ should not lockout backoffice user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @mrkalchemy and thank you for your contribution !
I've rebased your PR with the dev
branch to include this fix that was recently merged, otherwise the CI was red.
Hello @mrkalchemy Thanks for your PR 🚀 Thanks! |
I just discovered a problem with my original fix while doing some further testing on a different server. If the server had NO_ZERO_IN_DATE set in the [sql_mode] system variable then the sql would fail to run and not fix the issue. It's a bit of an edge case but may as well fix it now. Now it uses < to check if the date is before the 1970 epoch. |