Fix infinite loop when impersonated session time runs out#7221
Merged
oriolgual merged 14 commits intodecidim:developfrom Mar 5, 2021
Merged
Fix infinite loop when impersonated session time runs out#7221oriolgual merged 14 commits intodecidim:developfrom
oriolgual merged 14 commits intodecidim:developfrom
Conversation
Contributor
|
@decidim/product do you want to try to replicate this bug? |
Contributor
|
There's a failing job that's already fixed on |
3d5c85e to
07c386e
Compare
Contributor
|
In order to try to replicate the bug, I created a review app here: https://decidim-staging-pr-277.herokuapp.com/ |
Contributor
Author
|
Review app throws: When clicking impersonate. @mrcasals |
0d25e10 to
710474f
Compare
Contributor
Author
|
I think this is purely technical fix, dont you agree? @mrcasals. If you want to replicate this, you should change SESSION_TIME_IN_MINUTES to something like 1 minute, in decidim-core/app/models/decidim/impersonation_log.rb. |
oriolgual
approved these changes
Mar 5, 2021
entantoencuanto
added a commit
that referenced
this pull request
Mar 5, 2021
* develop: Fix infinite loop when impersonated session time runs out (#7221) New Crowdin updates (#7543) Migrate Admin menus to Menu Registry Part 2 (#7382) Replace xls with xlsx (#7421) Use cache_key_with_version instead of cache version (#7532) Add support for ElectionGuard voting scheme (#7454) Fix record encryptor trying to decrypt empty strings (#7542) Revert "Don't schedule CI jobs for locales PRs (#7534)" (#7546) New Crowdin updates (#7540) New Crowdin updates (#7539)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🎩 What? Why?
There is chance that impersonation.js inits reloads endlessly, this happens when impersonated sessions time runs out at the same time as a user is loading or reloading a page. We also have to prevent a redirect on ajax request, because otherwise reload in javacript cancels the redirect back to admin panel.
Testing (UPDATED)
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.