Skip to content

fix(fs): normalize destination path in TmpFs::rename_async - #735

Open
da1suk8 wants to merge 1 commit into
supabase:mainfrom
da1suk8:fix/tmp-fs-rename-async-normalize
Open

fix(fs): normalize destination path in TmpFs::rename_async#735
da1suk8 wants to merge 1 commit into
supabase:mainfrom
da1suk8:fix/tmp-fs-rename-async-normalize

Conversation

@da1suk8

@da1suk8 da1suk8 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

TmpFs::rename_async joined the destination onto the root without try_normalize, unlike rename_sync and every other path in TmpFs. A .. destination escaped the tmp root, and an absolute one replaced it (Path::join returns absolute paths as-is). Not reachable from user workers today (Deno.rename is blocklisted), but reachable from the main worker and embedders.

Validation

  • New tests: in-root rename still works; .. and absolute destinations return InvalidInput, matching rename_sync, with nothing created outside the root.
  • Reverting the one-line fix makes the rejection test fail.

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.

1 participant