restricted librarian urls give a 404 if normalised (e.g. by apache, chromium, often shows up on private PPA build logs)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
William Grant |
Bug Description
The restricted librarian generates non-canonical form urls, these can then be changed by canonicalising clients / intermediaries. Changing the restricted librarian urls causes the token to not match and a 404 - file not found - is returned to the client.
Apache without the nocanon config option will canonicalise, and some browsers like Chrome are known to canonicalise too.
Fairly simple file names - 'foo+bar.txt' - will show this problem.
Workarounds
===========
Use Firefox, run apache with nocanon on proxypass rules. We are currently doing the latter in the Canonical datacentre.
Proposed solutions
==================
* Change the url generation in Launchpad to be canonicalised, then canonicalisation will not change the url and things will Just Work.
Related branches
- Colin Watson: Approve
-
Diff: 152 lines (+57/-8)3 files modifiedlib/lp/services/librarian/client.py (+6/-3)
lib/lp/services/librarianserver/db.py (+20/-2)
lib/lp/services/librarianserver/tests/test_web.py (+31/-3)
Changed in launchpad-foundations: | |
status: | New → Triaged |
Changed in launchpad-foundations: | |
status: | Triaged → In Progress |
assignee: | nobody → Canonical LOSAs (canonical-losas) |
description: | updated |
description: | updated |
summary: |
- apache breaks restricted librarian on urls with percent encoded - characters. + restricted librarian urls give a 404 if normalised (e.g. by apache, + chromium, often shows up on private PPA build logs) |
Changed in launchpad: | |
assignee: | Canonical LOSAs (canonical-losas) → nobody |
status: | In Progress → Triaged |
description: | updated |
tags: | added: easy |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
I see a 404 with your url (note that the i12345 urls are time limited, and will give anyone that can copy them access to the content until the time expires -(24 hours at the moment).
Try putting the url into wget and see if it works any better, I suspect that the librarian is sending wonky content-encoding headers for some reason.