Skip to content

[Server] Restrict FileSessionStore::gc() to owned session files - #479

Merged
chr-hertel merged 1 commit into
modelcontextprotocol:mainfrom
chr-hertel:fix/issue-24-filesession-gc
Aug 24, 2026
Merged

[Server] Restrict FileSessionStore::gc() to owned session files#479
chr-hertel merged 1 commit into
modelcontextprotocol:mainfrom
chr-hertel:fix/issue-24-filesession-gc

Conversation

@chr-hertel

Copy link
Copy Markdown
Member

gc() unlinked any stale file in the session directory and only then checked whether the name was a UUID — pointing the store at a shared directory could delete unrelated files. Now the filename is validated as an RFC 4122 UUID before any unlink, so gc() only touches files the store owns.

Fork issue: chr-hertel#24

@chr-hertel chr-hertel added the Server Issues & PRs related to the Server component label Aug 24, 2026
@chr-hertel
chr-hertel merged commit c36e805 into modelcontextprotocol:main Aug 24, 2026
50 of 52 checks passed
@chr-hertel
chr-hertel deleted the fix/issue-24-filesession-gc branch August 24, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Server Issues & PRs related to the Server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant