-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Amend SE-0292 #1410
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
Amend SE-0292 #1410
Conversation
@tomerd I don't have anything else to add, so I'd be happy to merge these as soon as we reach a consensus on these changes. |
@mattt Would it be helpful to explicitly document what you have in mind for "Conventional HTTP redirects" so its clear how redirecting proxies are expected to work in this context? |
Sure, I just added an example in the specification of how redirection works to proxy a download to another host: swiftlang/swift-package-manager@aa5e65b. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our original plan was to use the
name
field in a package manifest to denote the package's name. However, we've come to see this as a bad design decision...
Does this mean there is no longer any correlation between the name
in the manifest and the package's name in a package registry? I realize that one of the reasons for the change is to avoid confusion. But doesn't it seem like having a different package name in the manifest than in the registry could be a source of confusion?
It burdens the registry with a requirement to invoke the Swift toolchain to parse the Package manifest
I appreciate the change in this regard.
Yes, that's correct.
The After working through the original proposal, we determined that the idea of using the |
Swift Package Manager should take care to | ||
identify and protect against these kinds of attacks | ||
in its implementation of source archive decompression. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robertlacroix What we have right now with ZipArchiver
delegates to unzip
:
Right now, we're using this only for user-specified source files in binary targets. Do you think we should do anything differently in support of archives sent from the package registry?
Based on our work implementing the specification and discussion with stakeholders, there are a few changes we'd like to make to SE-0292:
name
field in a package manifest to denote the package's name. However, we've come to see this as a bad design decision for several reasons:{name}
parameter in the HTTP request and the declared nameWe now propose to migrate existing packages according to their repository name, and have updated the naming rules accordingly. Notably, the use of dashes (-) are now supported.
archive-source
behavior: We propose thatswift package archive-source
subcommand should be equivalent togit-archive
with entries prefixed by output name.OPTIONS *
request to the server.GET /{scope}/{name}/Package.swift
now includesswift-tool-version
andfilename
attributes for each version-specific manifestLink
header value..swiftpm/config
to.swiftpm/configuration
; this PR updates accordinglyCorresponding changes to the registry service specification can be found at swiftlang/swift-package-manager#3624