-
-
Notifications
You must be signed in to change notification settings - Fork 21
(fix) Adding cookie expiration #61
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
Conversation
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.
Thanks for opening this pull request! Be sure to follow the pull request template!
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
|
I am a bot, here are the test results for this PR:
|
|
This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
Description:
Added a cookie expiration of one week to allow long-running browser sessions to request new cookie.
Added a try-except block around the second cookie decode attempt to allow invalid cookies to be removed.
Benefits of this PR and context:
Applying these changes locally allowed my long-running browser sessions to automatically request login credentials again. Invalid cookies were handled properly due to the new try-except logic and new cookies have an expiration of one week so the browser will automatically request credentials after the cookie has expired.
Closes #60
How Has This Been Tested?
I deployed these changes in my personal Docker stack with other applications using ldap-auth. The changes worked immediately as I had several long-running tabs with "500 Internal Server Error" errors now properly show the ldap-auth login page.
Source / References:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie