Skip to content

Internal error. Please file a bug at https://github.com/apple/swift-package-manager/issues with this info. symlinks not supported #7081

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

Closed
compnerd opened this issue Nov 12, 2023 · 1 comment · Fixed by #7092
Labels

Comments

@compnerd
Copy link
Member

Description

If a package contains a symlink for the manifest, the package build seems to fail. Example: https://github.com/compnerd/swift-firebase/actions/runs/6836319759/job/18591096135?pr=27#logs

Expected behavior

Package should be possible to build.

Actual behavior

Package manifest fails to build.

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

No response

@compnerd compnerd added the bug label Nov 12, 2023
compnerd added a commit to compnerd/swift-package-manager that referenced this issue Nov 14, 2023
The contents of a symlink is the path to which it points.  We can simply
read the contents as a new path, and use `getEntry` to get the contents
of the symbolic link.  This implementation should also fully traverse
any path that is a series of symbolic link.  This does allow for a DoS
attack by creating a recursive symbolic link cycle (e.g.
`a` -> `b` -> `a`).

Fixes: swiftlang#7081
@compnerd
Copy link
Member Author

@MaxDesiatov is this really Windows specific? It seems to be a generic code path, I don't see how this would be Windows.

compnerd added a commit that referenced this issue Nov 14, 2023
The contents of a symlink is the path to which it points. We can simply
read the contents as a new path, and use `getEntry` to get the contents
of the symbolic link. This implementation should also fully traverse any
path that is a series of symbolic link. This does allow for a DoS attack
by creating a recursive symbolic link cycle (e.g. `a` -> `b` -> `a`).

Fixes: #7081

Co-authored-by: Max Desiatov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants