Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#36813 - pacman should reject HTTP 300 responses
Attached to Project:
Pacman
Opened by Eric Rannaud (eric.rannaud) - Friday, 06 September 2013, 20:24 GMT
Last edited by Dave Reisner (falconindy) - Friday, 06 September 2013, 20:40 GMT
Opened by Eric Rannaud (eric.rannaud) - Friday, 06 September 2013, 20:24 GMT
Last edited by Dave Reisner (falconindy) - Friday, 06 September 2013, 20:40 GMT
|
DetailsSummary and Info:
The mirror mirrors.aggregate.org doesn't return 404 when a particular package version is missing, instead it returns a "300 Multiple Choices" webpage. pacman accepts the HTML content and tries to verify its signature, which of course fails. pacman should reject the content returned by a 300 response and go to the next mirror. Steps to Reproduce: # With a likely quite stale database (I haven't updated it recently), I did pacman -S cpupower # To get such a 300 HTTP response: curl http://mirrors.aggregate.org/archlinux/community/os/x86_64/cpupower-3.10-2-x86_64.pkg.tar.xz Workaround: pacman -Sy pacman -S cpupower |
This task depends upon
Closed by Dave Reisner (falconindy)
Friday, 06 September 2013, 20:40 GMT
Reason for closing: Won't fix
Additional comments about closing: Broken mirror. See FS#36815
Friday, 06 September 2013, 20:40 GMT
Reason for closing: Won't fix
Additional comments about closing: Broken mirror. See
This is a mirror issue. I'm not interested in fixing this in pacman.
However, pacman currently *accepts* such a response and handles the HTML data (that you copied in
FS#36815) as if it were a package file, and that fails, and pacman exits without completing the transaction, displaying a scary message about corrupted package or invalid signature.Instead, I'd argue, pacman should treat a 300 effectively like a response >= 400, delete the downloaded file and skip the mirror. Something like the patch in attachment?
Thanks.
RFC2616 is pretty vague about how this is generally handled:
---------8<-------------------
Unless it was a HEAD request, the response SHOULD include an entity containing a list of resource characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content- Type header field. Depending upon the format and the capabilities of
the user agent, selection of the most appropriate choice MAY be performed automatically. However, this specification does not define any standard for such automatic selection.
--------->8-------------------
I guess the proposed patch is the "best" thing we can do here, as odd as the behavior is. It isn't much different from failing on >=300 except for a 304, since there isn't a whole lot defined in the HTTP3xx range.