You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/drive
Craig Hesling 2b9d055101 drive: fix StatCache mishandling of paths with spaces
Fix "file not found" errors when WebDAV clients access files/dirs inside
directories with spaces.

The issue occurred because StatCache was mixing URL-escaped and
unescaped paths, causing cache key mismatches.
Specifically, StatCache.set() parsed WebDAV responses containing
URL-escaped paths (ex. "Dir%20Space/file1.txt") and stored them
alongside unescaped cache keys (ex. "Dir Space/file1.txt").
This mismatch prevented StatCache.get() from correctly determining whether
a child file existed.

See https://github.com/tailscale/tailscale/issues/13632#issuecomment-3243522449
for the full explanation of the issue.

The decision to keep all paths references unescaped inside the StatCache
is consistent with net/http.Request.URL.Path and rewrite.go (sole consumer)

Update unit test to detect this directory space mishandling.

Fixes tailscale#13632

Signed-off-by: Craig Hesling <craig@hesling.com>
3 months ago
..
driveimpl drive: fix StatCache mishandling of paths with spaces 3 months ago
drive_clone.go tailscale: update tailfs file and package names (#11590) 2 years ago
drive_view.go cmd/viewer: add field comments to generated view methods 3 months ago
local.go drive,ipn/ipnlocal: calculate peer taildrive URLs on-demand 5 months ago
remote.go drive: use secret token to authenticate access to file server on localhost 2 years ago
remote_nonunix.go tailscale: update tailfs file and package names (#11590) 2 years ago
remote_permissions.go drive: fix minor typos in comments 8 months ago
remote_permissions_test.go tailscale: update tailfs file and package names (#11590) 2 years ago
remote_test.go drive: move normalizeShareName into pkg drive and make func public (#11638) 2 years ago
remote_unix.go tailscale: update tailfs file and package names (#11590) 2 years ago