Improve session management: fix quoting and add expiration validation#1559
Closed
Improve session management: fix quoting and add expiration validation#1559
Conversation
- Fix: Quote $session_start variable in expire command to prevent word-splitting - Fix: Validate session is not already expired before allowing extend - Enhancement: Show session status after extend command - Improve: Add validation comments Fixes issues identified in review of PR #1542
Contributor
Author
|
closed by #1554 |
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.
Overview
Improvements and fixes to the session management logic that was introduced in PR #1542.
Changes
🐛 Bug Fixes
✨ Enhancements
get_session_infoafter extend to provide immediate feedback on new expiration timeDetails
Fix 1: Quoting in expire
Fix 2: Expiration validation before extend
extend) # Added validation block that checks: # - Session files exist # - Session hasn't already expired # Only then allows the 7-day extensionEnhancement: Feedback after extend
# Show updated session info after successful extension get_session_infoTesting
All existing tests from the original PR still apply. Additional test cases to verify:
Related Issues
Fixes review feedback from PR #1542