FS#49082 - pacman accepts and overwrites local repo DB with gibberish if behind captive portal

Attached to Project: Pacman
Opened by Mathias Burén (fackamato) - Monday, 25 April 2016, 23:31 GMT
Last edited by Andrew Gregory (andrewgregory) - Tuesday, 26 April 2016, 00:03 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No

Details

Summary and Info: Pacman syncs gibberish data if behind a captive portal, overwriting your local repo cache.


Steps to Reproduce:
1) Be behind a captive portal (e.g. hotel WiFi without logging on)
2) pacman -Syyu:

(downloads of repo data seem to complete successfully), then:

[..]
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/community-testing.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/community-testing.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/community.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/community.db: Unrecognized archive format
[..]
there is nothing to do

Now I have botched my local repo data?

Expected results:

1) pacman verifies that the repo file is sane (not HTML as it turned out to be in my case when behind the portal, but an actual repo file (.tar.gz?))

2) If the file is not sane, do not replace the local copy with the downloaded garbage. In theory this could lead to some repos being updated locally and some not. That should be fine as the user could have any amount and kinds of repos enabled.
This task depends upon

Closed by  Andrew Gregory (andrewgregory)
Tuesday, 26 April 2016, 00:03 GMT
Reason for closing:  Duplicate
Additional comments about closing:  FS#46107

Loading...