Skip to content

Conversation

@allison-truhlar
Copy link
Collaborator

@allison-truhlar allison-truhlar commented Jan 15, 2026

Clickup id: 86aegdjgw

This PR introduces logic to handle cases where a file path attempts to escape the root directory of a filestore (e.g., in the case of a symlink) by redirecting requests to the correct file share path (FSP) if possible. It does so by defining a new RootCheckError exception, implementing a database lookup for FSPs based on absolute paths, and updating the /api/files and /api/content endpoints to utilize this logic. Tests are also added for the new function that looks up FSPs based on absolute paths, and for the behavior of the endpoints in the case of a symlink.

When merged, this PR closes issue #293

@krokicki

@allison-truhlar allison-truhlar linked an issue Jan 15, 2026 that may be closed by this pull request
Copy link
Member

@neomorphic neomorphic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like there is anything new since our in person review, so it looks good to me. The tests look like they cover all the cases I can think of.

@allison-truhlar allison-truhlar merged commit 1a63707 into main Jan 15, 2026
7 checks passed
@allison-truhlar allison-truhlar deleted the symlink-redirect branch January 15, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Symbolic links to another zone are problematic

3 participants