Skip to content
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

Use Session to save impersonation target #2

Open
fopina opened this issue Mar 21, 2023 · 0 comments
Open

Use Session to save impersonation target #2

fopina opened this issue Mar 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@fopina
Copy link
Contributor

fopina commented Mar 21, 2023

https://github.com/surface-security/django-impersonate/blob/2697ddaeb95be60887f6e21699330974dbbd619a/impersonate/middleware.py#L21

Instead of using a new cookie, maybe it can be stored in Session. This will also have the benefit of making it encrypted (not that it is critical anyway).

While at it, also store "original URL" where the impersonation was triggered, so once impersonation is finished it can be redirected to that URL.

@gsilvapt gsilvapt added the enhancement New feature or request label Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants