Skip to content

feat: filter unsafe symlinks from file list when safe-links is active - #2590

Merged
oferchen merged 1 commit into
masterfrom
feature/safe-links-flist-filter
Mar 9, 2026
Merged

oferchen merged 1 commit into
masterfrom
feature/safe-links-flist-filter

Conversation

@oferchen

@oferchen oferchen commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add safe_links support to FileListWalker and FileListBuilder
  • Implement is_unsafe_symlink() mirroring upstream util1.c:1329
  • Handles absolute targets, empty targets, /../ rejection, depth-based escape detection
  • New module symlink_safety.rs with 14 unit tests

Test plan

  • CI passes (fmt, clippy, nextest, cross-platform)
  • Interop test with upstream rsync using --safe-links

@github-actions github-actions Bot added the enhancement New feature or request label Mar 9, 2026
@oferchen
oferchen force-pushed the feature/safe-links-flist-filter branch from 07598cc to dc71ffd Compare March 9, 2026 07:40
@oferchen
oferchen merged commit 2e2202b into master Mar 9, 2026
31 checks passed
@oferchen
oferchen deleted the feature/safe-links-flist-filter branch March 9, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant