Sessions: consolidate path hardening and fallback resilience#24657
Merged
vincentkoc merged 6 commits intomainfrom Feb 23, 2026
Merged
Sessions: consolidate path hardening and fallback resilience#24657vincentkoc merged 6 commits intomainfrom
vincentkoc merged 6 commits intomainfrom
Conversation
Member
Author
|
Added an extra hardening regression test for symlink escape paths. What it covers:
Validation rerun:
|
3 tasks
carlosrivera
pushed a commit
to myascendai/meshiclaw
that referenced
this pull request
Feb 23, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
3 tasks
mreedr
pushed a commit
to mreedr/openclaw-custom
that referenced
this pull request
Feb 24, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
xianfeng92
pushed a commit
to xianfeng92/openclaw
that referenced
this pull request
Feb 24, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
plgs2005
pushed a commit
to plgs2005/openclaw
that referenced
this pull request
Feb 24, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
2 tasks
mylukin
pushed a commit
to mylukin/openclaw
that referenced
this pull request
Feb 26, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…w#24657) * Changelog: credit session path fixes * Sessions: harden path resolution for symlink and stale metadata * Tests: cover fallback for invalid absolute sessionFile * Tests: add symlink alias session path coverage * Tests: guard symlink escape in sessionFile resolution
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.
Summary
agents/<id>/sessions/**boundsresolveSessionFilePathresilient to stale/corrupt persistedsessionFilemetadata by falling back to derived safe transcript paths@haoyifan,@EpaL,@vincentkoc)Files
src/config/sessions/paths.tssrc/config/sessions/sessions.test.tssrc/config/sessions.test.tsCHANGELOG.mdValidation
pnpm vitest run src/config/sessions/sessions.test.ts src/config/sessions.test.tsCredit / lineage
Greptile Summary
This PR consolidates session path hardening by resolving symlinks during containment checks and adding fallback resilience for stale/corrupt
sessionFilemetadata. The changes prevent session handler failures when persisted paths become invalid while maintaining cross-agent compatibility.Key Changes:
safeRealpathSynchelper to resolve symlinks safely with fallback to original path on failureresolvePathFromAgentSessionsDirandresolvePathWithinSessionsDirto resolve symlinks before performing containment checksresolveSessionFilePathlogic in try-catch to gracefully fall back to derived transcript paths whensessionFilemetadata is invalidConfidence Score: 5/5
Last reviewed commit: 67656f4