fix: Reduces Dashboard cookie lifetime #13895
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As reported by @prlanzarin, the Dashboard could possibly introduce a problem in BBB.
Every time a session is ended, Moderators receive a cookie with the
accessToken
to open the Dashboard.Even when moderator doesn't want to open the Dashboard, the cookie is set. And after several meetings (over 70) the cookies size limit would be exceeded and BBB would stop working.
E.g:
![dashboard-cookies](https://user-images.githubusercontent.com/5660191/145636222-bf595cae-5b49-4eeb-9162-537624c7abbe.png)
https://docs.microsoft.com/en-us/previous-versions/ms178194(v=vs.140)?redirectedfrom=MSDN
This PR propose some changes to reduce this probability:
Set the default expire time to 1hour, instead of 30 days (reduce garbage)
Case the Dashboard is opened, extends the cookie lifetime for more 7 days, instead of 30 days
Reduce the name of the cookie replacing
learningDashboardAccessToken-*
byld-*
Plus: Remove the accessToken from the Json to avoid demoted users to copy the token before be demoted