Skip to content

[ROMM-2114] Fix using symlinks on volumes #2123

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

Merged
merged 1 commit into from
Jul 21, 2025
Merged

[ROMM-2114] Fix using symlinks on volumes #2123

merged 1 commit into from
Jul 21, 2025

Conversation

gantoine
Copy link
Member

Description
Explain the changes or enhancements you are proposing with this pull request.

Fixes #2114

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots

@gantoine gantoine requested a review from Copilot July 21, 2025 20:34
Copy link

trunk-io bot commented Jul 21, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with symlink handling on mounted volumes by modifying the path validation logic to treat symlinks differently from regular files and directories. The change prevents symlinks from being resolved before validation, which was causing issues when symlinks pointed outside the mounted volume boundaries.

  • Modified path validation to check symlinks differently than regular files/directories
  • Added explicit error handling with descriptive error messages for paths outside base directory
  • Updated path normalization approach to avoid premature symlink resolution

Copy link

Test Results

318 tests   318 ✅  44s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 791939b.

Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
8006 5242 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/handler/filesystem/base_handler.py 95% 🟢
TOTAL 95% 🟢

updated for commit: 791939b by action🐍

@gantoine gantoine merged commit 4a44d00 into master Jul 21, 2025
9 checks passed
@gantoine gantoine deleted the romm-2114 branch July 21, 2025 21:25
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.

[Bug] Symlinks stopped working on scan
2 participants