-
Notifications
You must be signed in to change notification settings - Fork 3
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
New Hashing Algorithm in Django 4.1 #453
Comments
We updated the hashing algorithm to From analyzing the code, found out that we set 4 week time of session expiry here, and as per my current knowledge we don't extend the session expiry time, hence the user will be logged out after 4 weeks even if he/she remains active in those 4 weeks. Also currently we are blocked on MySQL upgrade for upgrading the Django version, and we are not aware of any exact timeline for when this blocker will be resolved, so we can wait for 2 more weeks so all old sessions will be logged out and replaced with new sessions. Also, the Django 4.2 upgrade PR is merged in the Quince branch, so waiting won't have any effect on the release schedule. The question I currently have is whether my understanding of the session expiry is correct or if is there any Job/Middleware that extends the user's session expiry. |
I would have guessed that the graphs would show more of an increase in 'default' and drop in 'fallback' than they do. Is it possible that each time the fallback happens it gets extended as a 'fallback' session, rather than immediately replacing it a 'default' session? Also, I added an (estimated) user count for fallbacks to the dashboard. |
Missed the notification. The current update is that all users are now shifted to the new hashing algorithm in prod, but for Edge, there are still around 25-30% of users with the old hashing algorithm. We tried comparing configs of prod and edge to find out why the users are not being logged out there after 4 weeks. We found one user who logged in around 2.5 months ago and was still not logged out. @robrap Any idea what could be the reason for that? |
Sorry @iamsobanjaved. I do not know. I didn't see any obvious config differences, but I'm not sure of session length. If you log in to prod and edge in a private browser, is there an obvious difference in the session cookie expiration? Separately, once you've established you won't cause a storm of logins that could hurt the system, you could always decide to update and force re-logins. |
Django introduced new signing algorithm
sha256
as default in Django 3.1 and provided us the transitional settings to keep the algo samesha1
while upgrading to Django 3.1+. But now that transitional setting is removed in 4.0.Now while testing on the sandbox, on upgrading the version of Django from 3.2 to 4.2 logged-in user is logged-out.
More from the release notes
https://docs.djangoproject.com/en/4.2/releases/3.1/#default-hashing-algorithm-settings
The text was updated successfully, but these errors were encountered: