Skip to content
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

[6.1] Ensure that FileManager.copyItem cannot copy directory metadata to files #1083

Merged

Conversation

jmschonfeld
Copy link
Contributor

  • Explanation: Eliminates a TOCTOU issue that allowed FileManager to copy metadata from files believing they were directories
  • Scope: Impacts FileManager.copyItem(atPath:toPath:) on non-Windows platforms
  • Original PRs: Ensure that FileManager.copyItem cannot copy directory metadata to files #1081
  • Risk: Medium - large amount of new code but it has a decent amount of testing and the reward of fixing the TOCTOU issue is high
  • Testing: local testing, swift-ci testing
  • Reviewers: @parkera

…les (swiftlang#1081)

* (135575520) Ensure that FileManager.copyItem cannot copy directory metadata to files

* Fix whitespacing

* Fix Windows test failure
@jmschonfeld jmschonfeld requested a review from parkera December 11, 2024 23:07
@jmschonfeld jmschonfeld changed the title Ensure that FileManager.copyItem cannot copy directory metadata to files [6.1] Ensure that FileManager.copyItem cannot copy directory metadata to files Dec 11, 2024
@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld jmschonfeld merged commit 80093d6 into swiftlang:release/6.1 Dec 12, 2024
3 checks passed
@jmschonfeld jmschonfeld deleted the 6.1/fm-directory-copy-toctou branch December 12, 2024 17:35
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.

2 participants